[ENet-discuss] ENET_PROTOCOL_MAXIMUM_PEER_ID

Soren Dreijer dreijer at echobit.net
Sat Aug 2 18:08:01 PDT 2014


So, I peeked at the code and it looks like it's just a matter of updating
the position of the bit flags in ENetProtocolFlag and making sure the rest
of the code uses the proper constants (such as
ENET_PROTOCOL_HEADER_SESSION_SHIFT, ENET_PROTOCOL_HEADER_FLAG_MASK and
ENET_PROTOCOL_HEADER_SESSION_MASK).

At a quick glance, it looks like you've done a good job of always using
them, so it shouldn't be too difficult to just shift them up a bit and
using a larger field for the peerID field.

/ Soren



On Sat, Aug 2, 2014 at 3:43 PM, Soren Dreijer <dreijer at echobit.net> wrote:

> Hey Lee,
>
> Thanks for the quick reply. So, what do I need to do to raise the limit? I
> really would like to be able to handle more users than just 0xFFF since my
> server has plenty of CPU and bandwidth left.
>
> > On Aug 2, 2014, at 11:45 AM, Lee Salzman <lsalzman at gmail.com> wrote:
> >
> > Those bits are used for storing flags. You can't just use them like that.
> >
> >> On 08/02/2014 09:09 PM, Soren Dreijer wrote:
> >> Hi fellas,
> >>
> >> I've once again hit the upper limit for peers on my Enet server, which
> is hardcoded to 0xFFF. I dug up some old posts that suggested this value
> cannot be changed.
> >>
> >> Is this still true in the latest version of Enet? As far as I can tell,
> ENetProtocolHeader uses a 16-bit value for the peer ID, which means
> ENET_PROTOCOL_MAXIMUM_PEER_ID could be set to 0xFFFF.
> >>
> >> Are there other reasons why the maximum limit is set to 0xFFF that I
> should be aware of?
> >>
> >> Thanks,
> >> Soren
> >>
> >>
> >> _______________________________________________
> >> ENet-discuss mailing list
> >> ENet-discuss at cubik.org
> >> http://lists.cubik.org/mailman/listinfo/enet-discuss
> >
> > _______________________________________________
> > ENet-discuss mailing list
> > ENet-discuss at cubik.org
> > http://lists.cubik.org/mailman/listinfo/enet-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20140802/06b2b8d9/attachment.html>


More information about the ENet-discuss mailing list