[ENet-discuss] how to prevent a host to connect with itself when using ENET_HOST_BROADCAST ?

Benoit Germain bnt.germain at gmail.com
Wed Feb 27 09:21:22 PST 2013


I have an application where I create a host, then issue a broadcast connect
request. That way, when several PCs launch the application, they should end
up being connected to each other. I have a small issue though: the host
connects with itself!

I do this with the attached Lua binding, which is hopefully straightforward
enough to understand. The output is:

>lua51 broadcast.lua
peer: 004EB568
connected with WKS-041455 15000
connected with WKS-041455 15000

Question: how can I prevent a host to connect with itself in this situation?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20130227/f91d3a56/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: broadcast.lua
Type: application/octet-stream
Size: 829 bytes
Desc: not available
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20130227/f91d3a56/attachment-0001.obj>

More information about the ENet-discuss mailing list