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

Shall the tcp_send function be used on the TCP server?

Now I'm using RL-TCPnet on an embedded controller which acts as the TCP server. The server returns back different messages according to different messages sent by different clients. To return back the messages to different clients, I guess that tcp_send function should be used. If my guess is right, I want to know if the server's tcp socket is defined as socket_tcp = tcp_get_socket(TCP_TYPE_SERVER,0,10,tcp_callback), shall the tcp_send function be called in the tcp_callback function on the TCP server?

Parents
  • Thanks Mr Franc Urbanc for your help. Can you answer me another question about RL-TCPnet? I want to make such an embedded system as following. The embedded system acts as a TCP server, it receives different messages which are sent by different clients and it sends back different messages to different clients. There're three TCP socket types in RL-TCPnet, TCP_TYPE_SERVER, TCP_TYPE_CLIENT, TCP_TYPE_CLIENT_SERVER. I tried to use TCP_TYPE_SERVER, but I found that TCP_TYPE_SERVER can only listen and can't send messages out. Can you tell me which socket types I can used in the above embedded system? Thanks.

Reply
  • Thanks Mr Franc Urbanc for your help. Can you answer me another question about RL-TCPnet? I want to make such an embedded system as following. The embedded system acts as a TCP server, it receives different messages which are sent by different clients and it sends back different messages to different clients. There're three TCP socket types in RL-TCPnet, TCP_TYPE_SERVER, TCP_TYPE_CLIENT, TCP_TYPE_CLIENT_SERVER. I tried to use TCP_TYPE_SERVER, but I found that TCP_TYPE_SERVER can only listen and can't send messages out. Can you tell me which socket types I can used in the above embedded system? Thanks.

Children