SuperSocket icon indicating copy to clipboard operation
SuperSocket copied to clipboard

SuperSocket.Client's ConnetAsync function got a System.Net.Sockets.SocketException

Open Akira3Chou opened this issue 2 years ago • 3 comments

我在连接到一个本地服务器时,发生了如下异常 01_ExceptionOccur

当我尝试进行调试,发现问题出现在这里 02_DebugTheCode

当我在查找资料时,发现这里有类似的问题,https://github.com/shadowsocks/shadowsocks-windows/issues/476 我根据这个issue的建议执行netsh winsock reset命令 03_ExecuteTheResetCmd

reset命令执行完毕后,这里的问题解决了,但是我本地启动的Socket服务器无法启动了。 04_DebugTheCodeAfterResetCmd

有人遇到和我类似的状况嘛?顺便提一句,我这边是公司内网环境,在windows域中,并且本机网卡更换过。不知道是不是和环境有关。

Akira3Chou avatar May 15 '23 03:05 Akira3Chou

日志打印异常详细: System.Net.Sockets.SocketException (10014): 系统检测到在一个调用中尝试使用指针参数时的无效指针地址。 at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName) at System.Net.Sockets.Socket.get_RemoteEndPoint() at SuperSocket.Client.ConnectState.CreateChannel[TReceivePackage](IPipelineFilter`1 pipelineFilter, ChannelOptions channelOptions) at SuperSocket.Client.ConnetAsync(EndPoint remoteEndPoint, CancellationToken cancellationToken)

Akira3Chou avatar May 15 '23 03:05 Akira3Chou

这应该跟supersocket没有关系,你随便写个socket应该也是报这个错误!

wj8400684 avatar May 15 '23 07:05 wj8400684

这应该跟supersocket没有关系,你随便写个socket应该也是报这个错误!

这个问题的根源不在SuperSocket,但是其他的socket客户端都正常在工作,因为没有访问socket.RemoteEndPoint。我把这句注释掉了,SuperSocket一样也正常工作

Akira3Chou avatar May 15 '23 07:05 Akira3Chou