Jump to content

Recommended Posts

Hi

I am trying to send a file over TCP from a TCP client to server. If I run the server and client on the same computer the file is send fine, but if the server is on one computer on the network and the client on another the file is sent in what looks like more than one packet. In other words the server receives 4 msg from the client.

Why is this, how do I make it send in one go, or what is a way around it?

Side Note: TCP server has a max of 999999999

Edited by kingjacob90
Link to comment
Share on other sites

Hi. I'm guessing your file is larger than 17,520 bytes (0x4470 hex). AFAIK, the TCP buffer for Ethernet transfers is 0x4470, whereas on a single machine it can be up to 0xffffh (64K). NB This includes space for packet headers. It's similar even worse for MailSlot messages (65507 payload on single machine, but datagram-sized (424 bytes, including header) between machines on a network.

Maybe check HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\ <interface-name> for alternatives/settings.

Short answer: these are baked-in hardware/protocol limitations; the only way around would be to develop your own hardware and transfer protocol.:P

Edited by RTFC
Link to comment
Share on other sites

  • 4 weeks later...

Is there anyway to break things up into packets?

On 01/07/2017 at 7:43 PM, RTFC said:

Hi. I'm guessing your file is larger than 17,520 bytes (0x4470 hex). AFAIK, the TCP buffer for Ethernet transfers is 0x4470, whereas on a single machine it can be up to 0xffffh (64K). NB This includes space for packet headers. It's similar even worse for MailSlot messages (65507 payload on single machine, but datagram-sized (424 bytes, including header) between machines on a network.

Maybe check HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\ <interface-name> for alternatives/settings.

Short answer: these are baked-in hardware/protocol limitations; the only way around would be to develop your own hardware and transfer protocol.:P

Is there anyway to break things up into packets so they don't exceed said size?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...