Comments (4)
我怀疑你的客户端代码可能有问题,对同一client并发调用了多次Connect方法。
from supersocket.clientengine.
你的自动重连实现可能有问题。
from supersocket.clientengine.
不好意思,原来我是在连接发生异常时,再次异步连接,这种情况下会发生多个异步连接,但是后来想了这种方式是不对的。可能发生异常的地方难以估计,最后在连接关闭的事件里添加了再次连接的方法, m_ConnectTaskSource=null不需要注释。
现在我请问:在连接关闭的事件里添加了再次请求异步连接,这种方式是否合理?是否会出现连接关闭了,但是没有引发关闭事件(目前还没测试出这样的情况)?是否有更好的方式?
按照我现在的方式,有一个问题请看截图:(这种情况发生在,我把WIFI连接关闭,没有连接任何网络,但是网卡是可用状态)
最后还有个地方我修改了,,原来是private,因为使用客户端引擎,一般会继承EasyClient,然后实现自己的一些方法,如果捕捉到异常,当然希望能触发EasyClient的Error事件,自然private不大合适。
以上请了解,谢谢了
发件人: Kerry Jiang
发送时间: 2015-12-21 19:33
收件人: kerryjiang/SuperSocket.ClientEngine
抄送: jonney-wang
主题: Re: [SuperSocket.ClientEngine] m_ConnectTaskSource空引用 (#17)
我怀疑你的客户端代码可能有问题,对同一client并发调用了多次Connect方法。
—
Reply to this email directly or view it on GitHub.
from supersocket.clientengine.
- 连接上之后断开必然会触发OnClosed事件;
- 没有连接上的时候尝试连接失败,可能只会触发OnError事件;
- 任何修改,请你在fork之后的代码库里进行,然后 send pull request.
from supersocket.clientengine.
Related Issues (20)
- Supports Apache 2.2 proxy
- 说句心里话,真的太难用了,为什么不做简单一点?! HOT 2
- Fix: HttpConnectProxy partial support for Titanium/Apache, and add tests
- You cannot set LocalEdnPoint after you start the connection.
- “System.OutOfMemoryException”类型的未经处理的异常在 SuperSocket.ClientEngine.dll 中发生 HOT 1
- unhandled exception HOT 2
- ProcessReceive引发NullReferenceException HOT 1
- Unable to compile with the build.bat on Developer Command Prompt for VS2015 HOT 1
- Connection pool
- SuperSocket.ProtoBase.Extensions issues...
- Can SuperSocket support the UDP clients?
- Receive the messy code when using easyClient to transmit picture HOT 2
- Concurrent data capture.
- HttpConnectProxy.ProcessReceive fails when the second to last fragment ends in \r\n
- SslStreamTcpSession.Send() throws IOException when connection is closed
- it threw a ArgumentOutOfRangeException in version 0.10.0 net 45
- ConcurrentBatchQueue 线程安全问题
- 大神.想问下关于CloseReason的问题
- EasyClient多线程调用ConnectAsync方法(在.net 40),无应答
- Throw InvalidOperationException in TcpClientSession.Connect() instead of Exception()
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from supersocket.clientengine.