TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Socket.IO C++

253 点作者 Rauchg大约 10 年前

11 条评论

TazeTSchnitzel大约 10 年前
What is the point of using socket.io today? Three years ago WebSocket support wasn&#x27;t universally available, so you needed XHR etc. as a fallback. But now it&#x27;s 2015 and everything supports WebSocket. Why not just use them directly? They have a super simple API. (see: <a href="http:&#x2F;&#x2F;ajf.me&#x2F;websocket" rel="nofollow">http:&#x2F;&#x2F;ajf.me&#x2F;websocket</a> - a page I made about them)<p>If you&#x27;re worried about firewall&#x2F;proxy traversal, use wss:&#x2F;&#x2F; (WebSocket over TLS), which not only traverses, but doesn&#x27;t cause a speed and latency downgrade like falling back to XHR does.<p>I realise some sites might need to use socket.io if they&#x27;re targeting legacy platforms, but that&#x27;s an ever-shrinking slice of the market. For most sites it is probably overkill.
评论 #9369004 未加载
评论 #9368880 未加载
评论 #9369585 未加载
评论 #9368833 未加载
评论 #9368692 未加载
rburhum大约 10 年前
We implemented our own client using libwebsockets (<a href="https:&#x2F;&#x2F;libwebsockets.org&#x2F;trac&#x2F;libwebsockets" rel="nofollow">https:&#x2F;&#x2F;libwebsockets.org&#x2F;trac&#x2F;libwebsockets</a>). Our main rationale, was that we use the 95% of the same codebase for iOS&#x2F;Android&#x2F;Win&#x2F;OSX&#x2F;Linux.<p>I got curious about this library, but the boost dependency is an immediate &quot;oh hell no&quot;. Even more so now that we have good C++11 features across the board and so the boost dependency is something we avoid like the plague (we used to have it and C++11 support was a god-sent that enabled us to get rid of boost).<p>Nice to see more C++ libraries here though.
评论 #9368736 未加载
评论 #9368927 未加载
评论 #9368693 未加载
评论 #9368751 未加载
eps大约 10 年前
One thing to keep in mind is that there are C++ devs who like Boost and there are C++ devs who hate Boost with passion. There are also said to be devs who are merely OK with this abomination but they are more of an urban legend really.<p>In other words, consider the fact that by throwing Boost in the mix, you rob yourself a good half of the intended audience, if not more.
评论 #9370392 未加载
评论 #9370565 未加载
rubiquity大约 10 年前
To me adding a C++ client to Socket.IO seems like a feature to increase the adoption of Socket.IO by embedded&#x2F;IoT devices.
mintplant大约 10 年前
If you&#x27;re not bound to a browser, what&#x27;s the benefit of using WebSockets vs. something on top of normal sockets? Personally, I thought this was going to be a Socket.IO <i>server</i> in C++.
评论 #9368788 未加载
评论 #9370074 未加载
评论 #9370444 未加载
gcz92大约 10 年前
Out of curiosity, what&#x27;s the reasoning behind going with C++? Just for fun or is there some advantage to C++ over other languages for sockets?
评论 #9368546 未加载
banachtarski大约 10 年前
Why is the inclusion of boost touted like it&#x27;s a good thing? Boost is fun to play around with but for a production library, no thanks.
klinquist大约 10 年前
Would love a C# implementation that I could use in Xamarin!
评论 #9369855 未加载
donpdonp大约 10 年前
GRPC.io - thats where the next generation of efficient multiplexed streams will come from. Lack of a client side lib and http&#x2F;2 adoption means it&#x27;s still a ways out.
评论 #9370239 未加载
评论 #9368946 未加载
MordodeMaru大约 10 年前
Hope to see it soon in biicode!
juliangregorian大约 10 年前
Anybody else notice that Automattic (the wordpress company) now owns the github account for Socket.io? (<a href="https:&#x2F;&#x2F;github.com&#x2F;Automattic&#x2F;socket.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Automattic&#x2F;socket.io&#x2F;</a>) As well as mongoose, kue, expect.js and others... when and why did this happen?
评论 #9369548 未加载
评论 #9369662 未加载
评论 #9369264 未加载
评论 #9369242 未加载