consecutive tcp messages

I am using Keil's RL-TCPnet for network communications.
The controller (STM32F107) is supposed to send up to 10 consecutive tcp messages every 10 ms.
I am calling timer_poll() and main_TcpNet every cycle (every 10 ms), system timer is 100 ms.
When I am sending consecutive messages, only the first one goes through.
I tried to insert

while (tcp_check_send(socket_tcp) != __TRUE) {;}

before each message. In this case the controller just hangs there.

What can I do to send all the messages in succession?
Any suggestions are highly appreciated.

Gennady

Parents
  • Are you talking to a windows machine? This could be the source of your issues.

    TCP, unlike UDP, requires an ACK message to be sent back. Windows machines use a delayed ACK, which means for every other packet received, will the machine send back an ACK.

    To bypass this issue, I recommend using TCP_Check_send:

    www.keil.com/.../rlarm_tcp_check_send.htm

    From the manual:
    "[tcp_check_send] does this by checking whether the TCP connection has been established and whether the socket has received an acknowledgment from the remote machine for the previously sent data"

Reply
  • Are you talking to a windows machine? This could be the source of your issues.

    TCP, unlike UDP, requires an ACK message to be sent back. Windows machines use a delayed ACK, which means for every other packet received, will the machine send back an ACK.

    To bypass this issue, I recommend using TCP_Check_send:

    www.keil.com/.../rlarm_tcp_check_send.htm

    From the manual:
    "[tcp_check_send] does this by checking whether the TCP connection has been established and whether the socket has received an acknowledgment from the remote machine for the previously sent data"

Children
More questions in this forum