C网络编程?
对于 Windows 和 UNIX 上的 C 网络编程,哪些库是最好的(就性能而言)?
我对高频交易非常感兴趣。
我听说过 BSD 和 POSIX,但我不确定是否有更快的性能特定库?
What libraries are the best (in terms of performance) for network programming in C on windows and UNIX?
I'm quite interested with respect to high frequency trading.
I have heard about BSD and POSIX but I wasnt sure if there were faster performance-specific libraries?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
最快的方法是使用操作系统的网络功能:
socket()
、setsockopt()
、connect()
、listen( )
、send()
、recv()
等等。它们在几个操作系统上存在细微的差异。
为了解决这个问题,在几个库中都有它们的包装器,例如在 Qt 中(至少是 IIRC)。我认为如果你使用它们,任何事情都不会明显减慢......
The fastest way would be to use the OS's networking functions:
socket()
,setsockopt()
,connect()
,listen()
,send()
,recv()
etc. etc.There are subtle differences between them on several OS's.
To cope with this, there are wrappers around them in several libraries, e.g. in Qt (at least, IIRC). I don't think anything will noticeably slow down if you use them...
那么 ZeroMQ 呢? [http://www.zeromq.org/][1]
它速度更快,易于编码,也可以用作消息队列。
What about ZeroMQ. [http://www.zeromq.org/][1]
It's a faster, easy to code and also can be used as Message Queue.