How to abort socket's BeginReceive()?

后端 未结 7 2061
夕颜
夕颜 2020-12-05 06:17

Naturally, BeginReceive() will never end if there\'s no data. MSDN suggests that calling Close() would abort BeginReceive().

7条回答
  •  情歌与酒
    2020-12-05 07:08

    You can read my solution of this problem here(using comment of Pavel Radzivilovsky here): UdpClient.ReceiveAsync correct early termination

提交回复
热议问题