How to test for a broken connection of TCPClient after being connected?

前端 未结 6 1555
-上瘾入骨i
-上瘾入骨i 2020-12-14 03:08

I\'ve been fighting with one problem for a whole 3 days I can\'t find any solution, please help :)
I work with Visual Studio 2010 and C# language.

I have a devic

6条回答
  •  失恋的感觉
    2020-12-14 04:12

    it will be correct and working if you type the following:

    byte[] tmp = new byte[] {0};
    ...             
    client.Send(tmp, 1, 0);
    ...
    

提交回复
热议问题