This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

TCP Socket - Maximum Segment Size (TCP_MAXSEGSZ) issue

Greetings,

Intro: I am developing a TCP Server (TCP Passive Open) using LPC2364 (ARM7TDMI).  I need to transmit/ receive approximately 35 Kb of data through an active TCP connection.  As per document references, the  TCP_MAXSEGSZ macro defines the maximum size of the packet transmitted in a single transaction.  The possible range that can be defined is between 536 to 1460 bytes.

Issue: Even if I configure the maximum value 1460 as the Maximum segment size(TCP_MAXSEGSZ ), I am able to transmit only 554 bytes through an active connection.

I also came across the statement of Keil that the Maximum Segment size will be negotiated during initial handshake of the TCP connection. But the TCP client I am communicating with, is a Linux based system which has a minimum value of 4096 as Maximum Segment Size.

How can I solve this issue?

Requirement: I need the Maximum Segment size during transmission to be at least 1024 (1Kb).

Kindly help me out in this regard. Thanks in advance.

Parents Reply Children
  •  I am developing a micro-controller based product/device (TCP server) where this 35kb of data has to be received and stored in another place. I don't have  enough buffer space to store this 35kb in the controller. So my methodology is to divide the data into smaller packets, receive one packet, store it, send custom ACK and then receive another, store it and send custom ACK. This cycle repeats till the end. So, in this method if I have nearly 0.5kb as my maximum segment size, i'll have to make 70 transactions, which is time consuming and not reliable. So I wish to have atleast 1kb as my maximum segment size which would be much more efficient. Kindly guide me to a solution.