[ENet-discuss] ENet Control Messages

Giuseppe Greco giuseppe.greco at agamura.com
Wed Sep 12 06:37:21 PDT 2007


Thanks for your quick response.

I'm trying to modify ENet to support multicasting, in which case
control messages should always have the ACK flag turned off. When
a peer is in "multicast mode", control messages are just flagged
as UNSEQUENCED - I'm evaluating whether or not to send them more
than once in order to increase receipt probability.

By the way, if I have well understood, function
enet_peer_queue_outgoing_command() don't need to be modified - even
though it might be modified to handle multicast control messages
exactly like any other UNSEQUENCED data message, isn't it?

j3d.

> Because pretty much all protocol commands need to be acknowledge.
> The only exception is a disconnect where you've torn down the connection
> before you could ever check for acknowledgement, in which case it is
> somewhat moot. And the sequence numbers for protocol commands merely
> need to be increasing, not tightly packed, since they are not queued
> on the other end at all.
>
> Lee
>
> Giuseppe Greco wrote:
>> 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
>> ----------------------------------------
>> _______________________________________________
>> 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
>


----------------------------------------
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