Clear Filters
Clear Filters

Check if tcpip connection was closed by remote machine

2 views (last 30 days)
Hello,
I'm trying to set up a communication channel between two PCs that are connected via a local network. I want either of the two machines to close the connection and try to reconnect if the connection was closed by the remote machine, i.e. when the remote ran fclose(), crashed or restarted.
The Status property of the tcpip objects doesn't help here because it still says 'Open' if the connection was closed on the other side. I could periodically use netstat and check if the TCP connection is still listed as ESTABLISHED, but I feel there must be a more elegant way to do this.
Any ideas would be appreciated :)
Daniel

Answers (0)

Products


Release

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!