C# Server and Client - chunlieater/chunlifeet GitHub Wiki
如果client执行了close() 或者 stream 执行了dispose(),则server的read() 或者 beginRead()会不停的返回0,称为死循环,所以需要read()最好加上try{}catch(){}。
throw 或者 try{}catch(){} 都会终止程序进行,不过catch里的语句会被执行一次。
如果client执行了close() 或者 stream 执行了dispose(),则server的read() 或者 beginRead()会不停的返回0,称为死循环,所以需要read()最好加上try{}catch(){}。
throw 或者 try{}catch(){} 都会终止程序进行,不过catch里的语句会被执行一次。