RTCS send() with OPT_SEND_NOWAIT takes a while to return

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RTCS send() with OPT_SEND_NOWAIT takes a while to return

765 Views
rajbatra
Contributor IV

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

0 Kudos
2 Replies

406 Views
soledad
NXP Employee
NXP Employee

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:

http://social.technet.microsoft.com/Forums/en-US/w7itpronetworking/thread/9f476410-a7a6-4f5d-b9a9-0a...

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!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

406 Views
rajbatra
Contributor IV

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

0 Kudos