3

I am writing a python script to communicate with a embedded system that is running Freescale's MQX RTOS. I have to choose the RX window size in MQX and, for now, I have left it at its default value of 4380 bytes; three segments of 1460 bytes. The problem that I have now is that my python script, running on my host machine (gigabit ethernet controller going through a gigabit switch, autonegotiated to 1Gbps) is sending segments with a window size of 64199 bytes. It appears that when I attempt to send a large amount of data it overflows the MQX recieve buffer (as MQX reports a "Rx, Segments outside of Window" and drops the segment).

Is there a way using python sockets to adjust the window size?

I am using Python 2.7, Windows 7.

I cant post images yet but basically with wireshark I can verify the window sizes above.

mccartyn
  • 61
  • 1
  • 4
  • 1
    The sender's window size is a red herring. Each side advertises how much it is willing to receive. It is perfectly normal for one side to say, "I can receive 4380 bytes" while the other side says "I can receive 64199 bytes." Your problem isn't with the sender's window size, it is with the sender's MSS (Maximum Segment Size.) But even given that, the sender should never send more than the receiver has advertised a willingness to accept (via his own window size). – Robᵩ Jan 08 '14 at 22:46
  • Linux has the `TCP_WINDOW_CLAMP` option (see [`tcp(7)`](http://linux.die.net/man/7/tcp)); however, there's no equivalent option on Windows AFAICT. – Adam Rosenfield Jan 08 '14 at 22:53

0 Answers0