1Net.connect(3kaya) Kaya module reference Net.connect(3kaya)
2
3
4
6 Net::connect - Connect to a server
7
9 NetHandle connect( Protocol proto, String server, Int port, Bool
10 usetls=false, [String] certfiles=[] )
11
13 proto The network protocol to use
14
15 server The hostname or IP address of the server to connect to (e.g.
16 service.example.com , localhost or 192.168.20.25 )
17
18 port The network port to connect to
19
20 usetls If this is true, and the TLS library is available, then the con‐
21 nection will be encrypted. This parameter may be omitted and defaults
22 to false.
23
24 certs An optional list of certificate files for TLS encrypted connec‐
25 tions. Each file should contain one or more PEM-encoded certificates
26 for a trusted certification authority. If this list is empty (the
27 default), no certificate verification will be performed on encrypted
28 connections, which is insecure.
29
31 Connect to a server (optionally using TLS). Returns a connection han‐
32 dle.
33
35 Kaya standard library by Edwin Brady, Chris Morris and others
36 (kaya@kayalang.org). For further information see http://kayalang.org/
37
39 The Kaya standard library is free software; you can redistribute it
40 and/or modify it under the terms of the GNU Lesser General Public
41 License (version 2.1 or any later version) as published by the Free
42 Software Foundation.
43
45 Net.NetHandle (3kaya)
46 Net.Protocol (3kaya)
47 Net.closeConnection (3kaya)
48 Net.recv (3kaya)
49 Net.shutdown (3kaya)
50 Net.send (3kaya)
51
52
53
54Kaya December 2010 Net.connect(3kaya)