Difference between revisions of "enet.host:connect"

(Created page with "Connects a host to a remote host. Returns peer object associated with remote host. The actual connection will not ...")
 
Line 1: Line 1:
Connects a [[enet.host | host]] to a remote [[enet.host | host]]. Returns [[enet.peer | peer]] object associated with remote [[enet.host | host]]. The actual connection will not take place until the next [[enet.host:service | host:service()]] is done, in which a "connect" [[enet.event | event]] will be generated.
+
Connects a [[enet.host | host]] to a remote [[enet.host | host]]. Returns [[enet.peer | peer]] object associated with the remote [[enet.host | host]]. The actual connection will not take place until the next [[enet.host:service | host:service()]] is called, in which a "connect" [[enet.event | event]] will be generated.
 
== Function ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===

Revision as of 19:30, 23 July 2014

Connects a host to a remote host. Returns peer object associated with the remote host. The actual connection will not take place until the next host:service() is called, in which a "connect" event will be generated.

Function

Synopsis

event = host:service( timeout )

Arguments

number timeout
The max number of milliseconds to be waited for an event. Default is 0.

Returns

table event
An event or nil if no events occured.

See Also

Other Languages