AnsweredAssumed Answered

send() to other socket

Question asked by Emanuele Trapani on Jan 13, 2016
Latest reply on Jan 20, 2016 by Carlos_Musich

hi, i work on mqx 4.2, CW 10.6 and frdmk64f.

my application have, sometimes, a strange behaviour: while task 1 it does a trasparent between the uart and the socket X, another task, task 2, try to connect the socket Y to a remote server. A step of the connect process for socket Y is that my application, after the connect() function returns (it returns RTCS_OK also in the case that the remote server does not exist), it try to send a test packet to remote server so it can anderstand if the remote server exists or not( if the send() return a error). The strange thing is that, when the socket is created but not connected to the remote server (that not exists), the test packet is sent to the trasparent socket X, also if the send() return an error; and it cause to trasparent some problems. In other words, the send(socketY,...) send the packet to socketX.

this is not a problem of initialization variable; when i do the send()s the argument for socket definition is different between the trasparent send() and the send() of remote server connection. If the connection to the server has been established previously, all going well also in the case where the task test if the connection is still open sending another test_packet.

there is some behavior known of the send() function if the socket is created but not connect?

i hope i explaned well, sorry for my english.