[ENet-discuss] ENet Control Messages
Giuseppe Greco
giuseppe.greco at agamura.com
Wed Sep 12 01:27:31 PDT 2007
Hi there,
Looking at the ENet source code, it looks like most of the control
messages are sent with the ACK flag turned on - meaning they are
reliable. An exception is the "immediate disconnect" message;
such a message has the ACK flag turned off and the UNSEQUENCED
flag turned on.
Well, assuming control messages are sent over channel 0xFF, could
you explain me why in function enet_peer_queue_outgoing_command()
only valiable peer->outgoingReliableSequenceNumber is incremented,
regardless of whether or not the ACK flag is turned on?
Here below is the piece of code I am talking about:
ENetOutgoingCommand *
enet_peer_queue_outgoing_command (ENetPeer * peer, const ENetProtocol *
command, ENetPacket * packet, enet_uint32 offset, enet_uint16 length)
{
...
if (command -> header.channelID == 0xFF)
{
++ peer -> outgoingReliableSequenceNumber;
outgoingCommand -> reliableSequenceNumber = peer ->
outgoingReliableSequenceNumber;
outgoingCommand -> unreliableSequenceNumber = 0;
}
....
return outgoingCommand;
}
Thanks,
j3d.
----------------------------------------
Giuseppe Greco
Via Carà 26
6928 Manno (TI)
Switzerland
call giuseppe.greco via Skype
phone: +41 (0)91 604 67 65
mobile: +41 (0)79 590 33 06
email: giuseppe.greco at agamura.com
----------------------------------------
More information about the ENet-discuss
mailing list