The release notes of FW 4.3.8.1 in the section “All Boards” state:
“Improved network reliability around accept and receive.”
Does this handle the “for ever blocking Socket.Read()” for 100%?
Currently I have the following Code before I call Read to be sure it does not block for ever:
while (!socket.Poll(1000, SelectMode.SelectRead))
{
if (socket.Poll(100, SelectMode.SelectError))
{
Debug.Print("RCP Client Socket error");
throw new ApplicationException("RCP Client Socket error");
}
Thread.Sleep(1);
}
if (socket.Available == 0)
{
// disconnect
return false;
}
int n = socket.Receive(data, offset, size, SocketFlags.None);
But as you can imagine this raises the CPU load. Making the Sleep longer reduces my reaction time to incomming Messages.
This Code was specifically written to avaid the blocking clalls to Socket.Read() in FW4.3.6.
Can I safely remove this Code again in FW4.3.8.1 again?