Socket poll delay

Topics: Question
Apr 11, 2015 at 9:41 PM
Maybe I don't understand something, but why socket polling called with this argument?

Media.Common.Extensions.TimeSpan.TimeSpanExtensions.TotalMicroseconds(m_RtspSessionTimeout) / Media.Common.Extensions.TimeSpan.TimeSpanExtensions.NanosecondsPerMillisecond, MidpointRounding.ToEven

When I set timeout to 1 sec:
client.RtspSessionTimeout = TimeSpan.FromMilliseconds(1000);
poll actually called with argument:
m_RtspSocket.Poll(1000000.0 / 1000000.0 = 1, SelectMode.SelectWrite)
what means poll with timeout = 1 microsecond.

Apr 12, 2015 at 6:41 PM
Because you set the session to timeout in 1 second...

What it means is to poll for 1 microsecond...
Marked as answer by juliusfriedman on 4/12/2015 at 10:41 AM