Comments (10)
Already pushed to nuget, just use the version 0.8.0.11
https://www.nuget.org/packages/SuperSocket.ClientEngine/0.8.0.11
from supersocket.clientengine.
原文未添加 m_ReceiveCache.Clear();
from supersocket.clientengine.
I did a fix just now. Could you check if it works?
from supersocket.clientengine.
08.0.11确实可以了, 但.net 4.5使用await关键无法连127.0.0.1以上外的IP
from supersocket.clientengine.
你代码咋写的?
from supersocket.clientengine.
代码如下
client = new EasyClient();
var fakeReceiveFilter = new FakeReceiveFilter();
client.Initialize(fakeReceiveFilter);
var ipAddress = IPAddress.Parse("127.0.0.1");
var ipEndPoint = new IPEndPoint(ipAddress, 9090);
// client.LocalEndPoint = ipEndPoint;
client.NewPackageReceived += client_NewPackageReceived;
client.Error += client_Error;
client.Connected += client_Connected;
client.Closed += client_Closed;
await client.ConnectAsync(ipEndPoint);
public class EasyClient<TPackageInfo> : EasyClientBase
where TPackageInfo : IPackageInfo
{
public event EventHandler<PackageEventArgs<TPackageInfo>> NewPackageReceived;
public EasyClient()
{
}
public virtual void Initialize(IReceiveFilter<TPackageInfo> receiveFilter)
{
PipeLineProcessor = new DefaultPipelineProcessor<TPackageInfo>(receiveFilter,
2 * 1024 * 1024);
}
protected override void HandlePackage(IPackageInfo package)
{
var handler = NewPackageReceived;
if (handler == null)
return;
handler(this, new PackageEventArgs<TPackageInfo>((TPackageInfo)package));
}
/// <summary>
/// 析构函数释放连接
/// </summary>
~EasyClient()
{
if (this.IsConnected)
this.Close();
}
}
}
from supersocket.clientengine.
是不是被UI线程锁住了? await client.ConnectAsync(ipEndPoint).ConfigureAwait(false);
from supersocket.clientengine.
用你提供的代码也不行,不用await也不行
from supersocket.clientengine.
反正127.0.0.1以外的ip连不了
from supersocket.clientengine.
换成4.0的就可以
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.