[ENet-discuss] Problems getting ENet to work on Solaris

Lee Salzman lsalzman at telerama.com
Thu Sep 4 17:51:29 PDT 2003


You need to call enet_host_service() or enet_host_flush() on
the client side. Functions such as enet_peer_send() and
enet_peer_disconnect() only queue requests. 

enet_host_service() must be called after issuing anything 
other than a packet send (connection, disconnection, etc.), 
whereas enet_host_flush() will send out any queued commands 
(in particular, packet sends) but will not handle any acknowledgement 
until enet_host_service() is called (so enet_host_service()
at some point needs to be called if dealing with reliable packets.)

To summarize: ENet works in a "non-blocking" fashion, and doesn't
really do anything until enet_host_service() is called. :)

Lee

On Thu, Sep 04, 2003 at 02:46:42PM -0400, Eberhart, Andrew wrote:
> Hello.
> 
> I am having some problems with ENet on Solaris.
> 
> Disclaimer: I am a SysAdmin (not a programmer), so it a strong
> possibility that I am having usage issues.
> 
> If anyone can help me out with this, I'd appreciate it.
> 
> I tried using the example code from the ENet Tutorial to create a basic
> client and a server. If it would help to see the code, let me know.
> 
> The client says it is able to connect to the server just fine. It
> reports that a connection is seen (enet_host_service() == 1 and
> event.type == ENET_EVENT_TYPE_CONNECT). At this point, the server does
> not acknowledge anything received. The server is listening with the
> enet_host_service() function.
> 
> Once a packet is sent from the client with enet_peer_send() and then an
> enet_host_flush(), the server reports it received a new client
> connection. This only occurs when if a call is made to
> enet_host_flush(). It does not do anything if enet_peer_send() is used
> or after the first packet is sent.
> 
> I never see any other activity with the server other than that one
> connect. When the client calls enet_peer_disconnect() and
> enet_peer_reset(), the server does not indicate an
> ENET_EVENT_TYPE_DISCONNECT.
> 
> I have other issues, but I can wait for them. :-) Any help is
> appreciated!
> 
> 			Thanks!
> 			Andrew
> 
> ---
> Andrew Eberhart                    phone: (919) 845-7530
> Intel Americas, Inc.               email: andrew.eberhart at intel.com
> 



More information about the ENet-discuss mailing list