This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
比如网线拔插或者对方主动关闭了网络连接的话,我的程序里要如何判断呢?
最简单的办法,网线拔插的话,是可以通过网口的led判断的。网络连接关闭的话,应该是通过通讯的状态来判断的。