toWrite = min (toWrite, localSocket->GetTxAvailable ());
int amountSent = localSocket->Send (&data[0], toWrite, 0);
-// cout << Simulator::Now () << " AmountSend: " << amountSent << " Towrite: " << toWrite << endl;
if(amountSent < 0)
return;
(mysocket->sentBytes) += amountSent;