private void Send(object obj)
{
SoapNetworkMessage nm;
while (!this.isStopped)
{
try
{
nm = this.requests.Poll();
if (null == nm)
{
continue;
}
lock (this.sender)
{
this.sender.Send(nm.Payload, nm.Payload.Length, nm.DstAddress, nm.DstPort);
}
nm.AdjustAfterSend();
if (!nm.IsDone())
{
this.requests.Add(nm);
}
}
catch (SocketException)
{
this.isStopped = true;
}
}
}