// "ns3::TcpReno"
// "ns3::TcpTahoe"
- Config::SetDefault ("ns3::TcpSocket::SegmentSize", UintegerValue (1000)); // 1000-byte packet for easier reading
+ Config::SetDefault ("ns3::TcpSocket::SegmentSize", UintegerValue (1024)); // 1024-byte packet for easier reading
Config::SetDefault ("ns3::TcpSocket::DelAckCount", UintegerValue (1));
if(!strcmp(TcpProtocol,"default")){
return;
}
- uint32_t packetSize = 1024;
- uint32_t toWrite = min (mysocket->remaining, packetSize);
+ uint32_t toWrite = min (mysocket->remaining, txSpace);
uint8_t *data = (uint8_t*)malloc(sizeof(uint8_t)*toWrite);
int amountSent = localSocket->Send (&data[0], toWrite, 0);
free (data);