TcpGetLastRxTime

Discussion to talk about software related topics only.
Post Reply
addonray
Posts: 19
Joined: Thu Sep 03, 2015 10:46 am

TcpGetLastRxTime

Post by addonray »

Hi,

The docs state that TcpGetLastRxTime shouldn't be called more than once per second. Is that on a per-fd basis, or for any fd? I have 18 clients to do Keepalives with and need to know if I can use TcpGetLastRxTime in a loop for those clients. I expect to do keepalives about every 30 seconds.

Thanks,

Ray
sulliwk06
Posts: 118
Joined: Tue Sep 17, 2013 7:14 am

Re: TcpGetLastRxTime

Post by sulliwk06 »

Looking at the code, it seems like it's fine to call TcpGetLastRxTime repeatedly since it isn't waiting on anything. However the TcpSendKeepAlive call uses a critical section, so that is probably the function you don't want to call too often. It uses the same critical section as other TCP code regardless of what fd you are using, so I think that is where it will affect performance.
addonray
Posts: 19
Joined: Thu Sep 03, 2015 10:46 am

Re: TcpGetLastRxTime

Post by addonray »

Thank you, sulliwk06. I'll put code in there to space the outgoing keepalives at 1 or 2 second intervals to go easy on the TCP stack.

Ray
addonray
Posts: 19
Joined: Thu Sep 03, 2015 10:46 am

Re: TcpGetLastRxTime

Post by addonray »

If the keepalives were sent from the client (instead of being generated by the Netburner module), would TcpGetLastRXTime still record the times the remote keepalives arrived? This would be a .NET client with Dart's Sockets for .NET (MS implementation under the hood).

If this was the case, I could just check TcpGetLastRXTime for a change every expected keepalive period (plus latency) from connection time.

Thanks,

Ray
sulliwk06
Posts: 118
Joined: Tue Sep 17, 2013 7:14 am

Re: TcpGetLastRxTime

Post by sulliwk06 »

I would think that would work.
Post Reply