gaochundong / cowboy.websockets Goto Github PK
View Code? Open in Web Editor NEWCowboy.WebSockets is a C# based library for building WebSocket services.
License: MIT License
Cowboy.WebSockets is a C# based library for building WebSocket services.
License: MIT License
我把日志都改成 nlog了,你自带有时候会出错不知道为什么.
var config = new AsyncWebSocketServerConfiguration(); 这用Cowboy.WebSockets库用Logrila.Logging 有时会出错.
把nlog 是debugger输出
开server,然后客户端发送 many,过几秒强制关闭客户端
引发的异常:“System.Net.Sockets.SocketException”(位于 System.dll 中)
引发的异常:“System.IO.IOException”(位于 System.dll 中)
2016-12-14 15:44:50.1275 | Debug | WebSocket session [127.0.0.1:26612] received Binary -->
2016-12-14 15:44:50.1275 | Debug | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
qq:234862662 申请加你了
具体是server还是client不熟悉源码就不下结论了.
开启Cowboy.WebSockets.TestAsyncWebSocketServer
然后开AsyncWebSocketClient,发送many,发送 big100,然后等有ping,pong响应,再次发送数据server没有显示有数据过来.
然后我看了你博客说SegmentBufferManager回收不是缓存分配的或许用GetHashCode()可以解决?
不知道能否给Send增加个回调,这样我发送完成可以重复使用发送缓存.
html 快速发送多次一样的数据,后面几次数据就是都00000了
用的uc浏览器
感觉这个没有经过实际项目使用吧
换回fleck了
具体是server还是client不熟悉源码就不下结论了.
开启Cowboy.WebSockets.TestAsyncWebSocketServer
然后开Cowboy.WebSockets.TestAsyncWebSocketClient,发送many,发送 big100,然后等有ping,pong响应,再次发送数据server没有显示有数据过来.
然后我看了你博客说SegmentBufferManager回收不是缓存分配的或许用GetHashCode()可以解决?
不知道能否给Send增加个回调,这样我发送完成可以重复使用发送缓存.
感谢Gao兄所作的努力,感谢分享精神!
我使用WebSocket Server,使用Chrome或者EDGE,连接,可以连接成功,发送第一次消息成功,但第二次消息就会导致Chrome主动关闭连接,查看了一下,应该是发送时对内容编码导致。
看起来有三点:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.