本文介绍了停止TcpListener的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了TcpListener。 socket = listener.AcceptSocket(); socket.SetSocketOption(SocketOptionLevel.Socket,SocketOptionName.ReuseAddress,false); 当收到任何消息时,它的工作正常。 但是首先启动监听器,我突然想要停止监听器抛出错误。 "通过调用WSACancelBlockingCall来中断阻塞操作" 如何无误地阻止监听器。 提前致谢 Kalees
解决方案你很久以前就有同样的问题了。看看我的这个帖子。 social.msdn.microsoft/Forums/en-US/netfxnetcom/thread/7ffeef71-8978-41c9-9787-6d74e1326700 ETS
Hi , I created TcpListener. socket = listener.AcceptSocket(); socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, false); Its working fine when any messages received. But first start the Listener , suddenly i want stop the listener its throwing the error. "A blocking operation was interrupted by a call to WSACancelBlockingCall" How to stop the listener without error. Thanks in Advance Kalees
解决方案 Hii had the same issue not so long ago. have a look at this thread of mine.social.msdn.microsoft/Forums/en-US/netfxnetcom/thread/7ffeef71-8978-41c9-9787-6d74e1326700Ets更多推荐
停止TcpListener
发布评论