This project is read-only.
0

Closed

UdpServer - Add the option to execute asynchronously.

description

Currently UdpServer executes in a dedicated thread.
We need to add the Property UseDedicatedThread.
The default will be true.
When UseDedicatedThread is false the process that receives datagram will receive asynchronously.

If UseDedicatedThread is changed after the server is running an InvalidOperationException will be raised.
The property UseDedicatedThread must be exposed in UdpMessageServer as well.

Implemented:
It was implemented adding the property ReceiveAsynchronously (defaulted to false)
When ReceiveAsynchronously is true the datagrams are received using Socket.BeginReceiveFrom/Socket.EndReceiveFrom
when ReceiveAsynchronously is false Socket.ReceiveFrom is used.
Closed Sep 21, 2013 at 2:41 PM by valcarcel

comments