ThreadPool.QueueUserWorkItem( s=> (_udpSendSocket.SendTo(buffer, broadcastQueue[i].Count(), 0, (EndPoint)_myClientsList[client]._clientUDPEndPoint));EDIT: And set the number of worker threads at about 20(mabye even 30).
Show differencesHistory of post edits
#Actualdburner
Posted 20 July 2012 - 03:57 PM
I think there is another simple option for your problem. You could use ThreadPool class to send the data.
#2dburner
Posted 20 July 2012 - 12:07 PM
I think there is another simple option for your problem. You could use ThreadPool class to send the data.
ThreadPool.QueueUserWorkItem(_udpSendSocket.SendTo(buffer, broadcastQueue[i].Count(), 0, (EndPoint)_myClientsList[client]._clientUDPEndPoint);EDIT: And set the number of worker threads at about 20(mabye even 30).
#1dburner
Posted 20 July 2012 - 12:06 PM
I think there is another simple option for your problem. You could use ThreadPool class to send the data.
ThreadPool.QueueUserWorkItem(_udpSendSocket.SendTo(buffer, broadcastQueue[i].Count(), 0, (EndPoint)_myClientsList[client]._clientUDPEndPoint);