[ENet-discuss] How to temporarily keep a host from accepting incoming connection requests?

Benoit Germain bgermain at ubisoft.fr
Mon Jun 21 00:05:17 PDT 2010


> -----Message d'origine-----
> De : enet-discuss-bounces at cubik.org [mailto:enet-discuss-
> bounces at cubik.org] De la part de Philip Bennefall
> Envoyé : lundi 21 juin 2010 02:30
> À : Discussion of the ENet library
> Objet : Re: [ENet-discuss] How to temporarily keep a host from
> accepting incoming connection requests?
> 
> Hi Lee,
> 
> I also am interested in doing something like this, as I can then make
> it
> even easier for the users of my scripting engine to set up hosts that
> accept
> connections at certain times but not at others. Exactly which function
> would
> i have to modify to accomplish this? I assume I should be looking in
> the
> file called protocol.c? Some hints would be very much appreciated.
> Perhaps a
> quick wrapper function in the next minor build
> (enet_host_disable_incoming_connections) or similar?
> 
> Kind regards,
> 
> Philip Bennefall
 
I am currently using the solution I described in my original post, which works just fine as far as I can tell. Since the host structure is public, there is no need for an api function, just change host->sessionPassword whenever you need to.

Regards,


Benoit.


More information about the ENet-discuss mailing list