[ENet-discuss] Reducing traffic from ENet internally on mobile devices

Krasimir Marinov krasi at jklsemi.com
Tue Dec 17 08:02:01 PST 2013


I understand the purpose of the ping, but wonder why after PING, the 50B packet, another one with size 52B is sent immediately?

I though that just PINGs should be sent on each ping interval….and that’s why I wonder what is the purpose of the other packet?

On Dec 17, 2013, at 5:57 PM, Lee Salzman <lsalzman at gmail.com> wrote:

> See: enet_peer_ping_interval
> 
> http://enet.bespin.org/group__peer.html#gacddc2107f6e6b9e39812c1dfecff335b
> 
> 
> On 12/17/2013 05:39 PM, Krasimir Marinov wrote:
>> 
>> 
>>  I’d like to join the discussion that had been started 3-4 months ago, because I experience the behaviour described by Stefan.
>> 
>> Monitoring an idle ENet connection with Wireshark reveals that each 500ms a 50B packet (real data is 8B - 4B length = 4B = ENetProtocolPing) is sent from the initiator of the connection
>> to the “server”. The “server” immediately responds with PING (50B UDP packet, data = 8B).
>> Immediately after that another packet is sent to the “server”with length 52B (real data is 10B, which makes 10B - 4B length = 6B = ENetProtocolSendReliable).
>> The server responds immediately with another ENetProtocolSendReliable.
>> 
>> This sequence of packets is repeated every 500ms. I understand the PING, but why is the other packet sent?
>> 
>> P.S. The scheme looks like:
>> 
>> Client Server
>> ————————————>50B (ENetProtocolPing)
>> 
>> 50B(ENetProtocolPing)<———————————————
>> 
>> ———————————>52B(ENetProtocolSendReliable)
>> 
>> 52B(ENetProtocolSendReliable)<—————————————
>> 
>> 
>> 
>> 500ms
>> 
>> the same repeats
>> 
>> 
>> 
>> Here is the initial email:
>> 
>> 
>>  Hi Lee and thanks for your response!
>> 
>> But the ping functions get called (after modifying
>> ENET_PEER_PING_INTERVAL) every ~30 seconds yet
>> enet_peer_queue_incoming_command() is called every second or so on both
>> sides. Wireshark shows packets of 50 and 52 bytes size being sent back
>> and forth at the same rate.
>> I'll check what types of commands those are.
>> 
>> Sincerely,
>> Stefan
>> 
>> 
>> 
>> _______________________________________________
>> 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




More information about the ENet-discuss mailing list