[ENet-discuss] ENet doesn't do servers?

Marc Rochel marc.rochel at udicom.de
Thu Dec 13 19:45:37 PST 2007

enet builds on top of udp. udp itself is not connection oriented.
Therefore no accept is used. The logical connections are managed by enet
If you use tcp, you need to call accept at some point.



Von: enet-discuss-bounces at cubik.org
[mailto:enet-discuss-bounces at cubik.org] Im Auftrag von Shawn Yarbrough
Gesendet: Freitag, 14. Dezember 2007 04:04
An: enet-discuss at cubik.org
Betreff: [ENet-discuss] ENet doesn't do servers?

I must be missing something, but as far as I can tell, enet doesn't work
for servers?

Some grepping of the ENet code base shows that the accept() system call
is never called
anywhere.  (Unless the user calls enet_socket_accept() directly, which
none of the
ENet instructions say is expected to ever happen.)

But the UNIX listen(2) man page says:

    To accept connections, a socket is first created with socket(2),
    a willingness to accept incoming connections and a queue limit
    for incoming connections are specified with listen(), and then
    the connections are accepted with accept(2).

ENet does call listen.  Then it polls/selects on the socket waiting for
activity, but
when activity appears, it doesn't seem to do the right thing for a
server which would
be to do an accept() system call.

If I could find one example of a working server, using ENet, it would
probably help me.

Some ENet developer please correct me if I'm wrong, or please confirm
that I'm right
and I'll help improve ENet to fix the problem.


Shawn Yarbrough


Never miss a thing. Make Yahoo your homepage.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cubik.org/pipermail/enet-discuss/attachments/20071214/292af65a/attachment.htm 

More information about the ENet-discuss mailing list