networkStream.Read is blocking

后端 未结 1 1403
一向
一向 2020-12-04 02:57

I\'m writing a simple application which will connect with a server. However I want to send simple chat commands aswell (see Console.ReadLine below). However thi

相关标签:
1条回答
  • 2020-12-04 03:40

    You could try using the DataAvailable property. It'll tell you whether there's anything waiting on the socket. If it's false, don't do the Read call.

    0 讨论(0)
提交回复
热议问题