TcpClient例子(2)更robust的程序
摘要:目的:在上一个例子的基础上,我们的程序需要更加的robust。需求是一个在客户端的长连接,在连接,发送和接受发生各种非正常情况下, 程序需要自动重连,自动恢复运行。 怎样判定socket异常需要重连。 连接:在回调函数的EndConnect时需要try catch 发送:在BeginSend直接tr
阅读全文
posted @ 2018-05-31 10:59
posted @ 2018-05-31 10:59
posted @ 2018-05-29 14:41
posted @ 2018-05-28 15:20
posted @ 2018-05-23 15:19
posted @ 2018-05-22 15:25
posted @ 2018-05-18 14:22
posted @ 2018-05-17 15:07