Difference between revisions of "ClientObject:connect"
(Created page with 'Connect to a server. == Function == === Synopsis === <source lang="lua"> clientobject:init( sockettype ) </source> === Arguments === {{param|SocketType|string|"tcp", "udp" or use…') |
|||
(One intermediate revision by one other user not shown) | |||
Line 3: | Line 3: | ||
=== Synopsis === | === Synopsis === | ||
<source lang="lua"> | <source lang="lua"> | ||
− | clientobject: | + | clientobject:connect(host, port, dns) |
</source> | </source> | ||
=== Arguments === | === Arguments === | ||
− | {{param| | + | {{param|string|host|The host to connect to.}} |
+ | {{param|number|port|The port to connect to on the host.}} | ||
+ | {{param|string|dns|Specifies if the host is a name or an IP (If its a hostname, Then do a DNS lookup). Default is IP.}} | ||
=== Returns === | === Returns === | ||
− | + | Assertion upon failure, or true upon success. | |
+ | self.host becomes the host name. | ||
+ | self.port becomes the port name. | ||
+ | self.connected becomes a boolean set to true. | ||
== See Also == | == See Also == | ||
* [[parent::ClientObject]] | * [[parent::ClientObject]] | ||
Line 14: | Line 19: | ||
{{#set:Description=Connect to a server.}} | {{#set:Description=Connect to a server.}} | ||
== Other Languages == | == Other Languages == | ||
− | {{i18n|ClientObject: | + | {{i18n|ClientObject:connect}} |
Latest revision as of 02:31, 16 March 2013
Connect to a server.
Function
Synopsis
clientobject:connect(host, port, dns)
Arguments
string host
- The host to connect to.
number port
- The port to connect to on the host.
string dns
- Specifies if the host is a name or an IP (If its a hostname, Then do a DNS lookup). Default is IP.
Returns
Assertion upon failure, or true upon success. self.host becomes the host name. self.port becomes the port name. self.connected becomes a boolean set to true.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info