I timed sending 1450 bytes via socket send (it's a TCP Stream), on my K64, it can take up to 800 uS. I tried with OPT_SEND_NOWAIT, not using the push flag, and even directly setting the MSG_DONTWAIT in the send command and still see 800uS.
The timing was done on a scope (setting pin high/low before/after command).
I noticed that sock_stream.c, SOCK_STREAM_send calls RTCSCMD_issue which calls RTCS_msg_send_blocked in both the WAIT and NOWAIT state. There is an RTCS_msg_send command that isn't called. Not sure if this is why it's taking so long to return or is this normal?
Thanks,
-Raj
Hello,
Which MQX version are you using?
There exists 200 ms TCP ACK Delay in Windows 7 tcpip stack. It is intentional by Microsoft, it can be switched off. The workaround is here:
Please let me know if this helps,
Have a great day,
Sol
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Sol,
I'm using mqx that came with KSDK 1.2.
I'm using Mac OSX. Send call takes 810uS (much less than 200ms), but higher than I expect for a No Wait operation. For me to prepare the buffer to send only takes 10uS.
Thanks,
-Raj