TCP null protocol - droping the connection


Ugljesa

Recommended Posts

Hello,

I'am using null protocol to send data over the internet to uC. I want to be able to connect to the uC which works with initComm but I also want to drop the connection when I'am not using it. It seems to me that connection never drops. On uC i have information that connection has been dropped, but when I allow uC to listen if there is incoming request for connection it immediately connects back to DAQFactory. When I disconnect connection with uC and change port number in DAQFactorly it surely don't make connection but when i change it back it immediately connects again. So my question is, Is there way to drop connection on given port ? or can you confirm me for sure that DAQFactory closes connection so I can focus on uC and his XPort module.

Best regards,

Ugljesa Popovic.

Link to comment
Share on other sites

I'm assuming we are talking Ethernet as really you can't detect if something is on the other end of a serial line.  To disconnect a TCP socket, set the address to empty and call initComm().  Then to restablish, set the address to the desired address and call initComm() again.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.