Peter Soxberger wrote: ... > If I calculate the real size of a packet, is this correct: > > [UDP Header]+[ENet Headers]+[packet->dataLength] = Packet Size >
As someone already mentioned, ENET packs more than one user packet into a single UDP packet. But I'm not exactly sure how one should handle that. And the UDP header size is always 64 bits (8 bytes.) Also, I think you should take into account the IP protocol header as well. If you use IPv4, which you probably do, the header size is somewhere between 160 bits (20 bytes) and 480 bits (60 bytes.) But the excess header size is due to IPv4 "options" which, AFAIK, are seldom (if ever) used any more. If you happen to use IPv6 (does ENET even run on this?) the header size for that is a fixed 320 bits (or 40 bytes.) Hope this helps. -yzt
signature.asc
Description: OpenPGP digital signature
_______________________________________________ ENet-discuss mailing list [email protected] http://lists.cubik.org/mailman/listinfo/enet-discuss
