SuperSocket.ClientEngine
SuperSocket.ClientEngine copied to clipboard
EasyClient Close的时候出现错误一个封锁操作被对 WSACancelBlockingCall 的调用中断
我使用的是3.5编译出来的ClientEngine,但是发现 每次服务器主动关闭,或者说客户端调用Close 都会报这个错误。。
Error:一个封锁操作被对 WSACancelBlockingCall 的调用中断。
另外还有一个问题。。EasyClient 有没办法能把 连接的结果 和 错误的回调 分开?
Do you have a test project to produce this issue?
public EasyClient easyClient;
public void Connect(string ip,int port)
{
easyClient = new EasyClient();
easyClient.NoDelay = true;
easyClient.Initialize<BinaryPackageInfo<int>>(new GameReceiveFilter(), MsgHandler);
easyClient.Connected += easyClient_Connected;
easyClient.Closed += easyClient_Closed;
easyClient.Error += easyClient_Error;
easyClient.BeginConnect(new IPEndPoint(IPAddress.Parse(ip), port));
}
void easyClient_Error(object sender, SuperSocket.ClientEngine.ErrorEventArgs e)
{
Debug.Log("EasyClent Error :" + e.Exception.Message);
BinaryPackageInfo<int> msg = new BinaryPackageInfo<int>((int)ProtocolConst.Error, null);
lock (msglock)
msg_queue.Add(msg);
}
private void MsgHandler(BinaryPackageInfo<int> msg)
{
lock (msglock)
msg_queue.Add(msg);
}
我是在Unity 里使用 ClientEngine的,编译版本为3.5,基本每次 Close都会触发这个error的事件 跟提供的例子一样。。报错是在监听的 Error事件里发生的
能把Exception的StackTrace log一下吗?
Stack Trace 是 Null Socket Error 是 Interrupted Err Code 10004
只有Exception.Message 是有信息的
Do you have a piece of sample code to produce this issue?
I cannot reproduce it by my test case.