enet.host:connect

enet.host:connect

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

peer = host:connect(address, channel_count, data)

Arguments

string address
The address to connect to in the format "ip:port".
number channel_count
The number of channels to allocate. It should be the same as the channel count on the server. Defaults to 1.
number data
An integer value that can be associated with the connect event. Defaults to 0.

Returns

enet.peer peer
A peer.

See Also

© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/enet.host:connect

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部