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

Ruud van Gaal ruud at racer.nl
Thu Jun 17 03:29:38 PDT 2010


> > I am not entirely sure why you would even want a password, 
> especially 
> > of such small size, if your goal is just to entirely block 
> > connections? It may as well be a boolean flag in the host 
> that, when 
> > set, drops all connect packets there.
> 
> Well, I am not looking for strong security here, just some 
> kind of basic filtering.

Neither methods seem to deal with 'security', imho. Too basic.

...
> Session blocking, however, has utility in released 
> products. I just don't want to 'waste' a separate boolean on 
> this when a special filter can to the trick.

A boolean can be just 1 bit in a 32-bits flags field. Not sure if the 'host'
struct already has such a field.
Also, you don't want to waste a boolean but then want to add:

  enet_uint32 sessionPassword;

to the host struct. How's that any less wasteful?

I agree with Lee; your original problem states you want to 'ignore incoming
connection requests'. A boolean that would be called
'ignoreIncomingConnectionRequests' seems to be logical. A 'sessionLocked'
seems a more abstract term than that. And simple things...

But perhaps I'm missing the point where a 'sessionLocked' would still be
useful in a release scenario...

Ruud



More information about the ENet-discuss mailing list