Create TCP Packet in C#

I'm sending data to an extremely old system via TCP. I need to send 2000 bytes in one packet, and I need it not to be split up (what happens when I write out 2000 bytes via a socket).

While, yes, I shouldn't have to care about this at an application level -- I in fact do care about this, because I have no other options on the older system, everything MUST be received in a single packet.

Is there something less terrible than calling netcat?

Upvotes: 2

Views: 2192

Answers (1)

Nikolai Fetissov
Nikolai Fetissov

Reputation: 84239

Unless you are on a link with jumbo frames the usual MTU on the ethernet is 1500. Subtract IP (20 bytes) and TCP headers (at least 20 bytes). So no luck with 2000 bytes in a single packet.

Upvotes: 4

Related Questions