Socket receive timeout in compact framework

  • Thread starter Thread starter Doug Crawford
  • Start date Start date
D

Doug Crawford

When I try to set the receive timeout using:

udpSocket.SetSocketOption(SocketOptionLevel.Socket,
SocketOptionName.ReceiveTimeout, timeout);
}

I get an error on the Compact Framework. Is there any way around this.
What is the correct way to receive a UDP packet and still be able to
handle the case where the packet gets lost?
 
You can use Select() to wait for data to arrive *or* for a given amount of
time to elapse.

Paul T.
 
Back
Top