简体   繁体   中英

high performance sockets library for windows

I saw a very nice library for sockets in POCO library. This uses a "classic" approach that works on both linux and windows systems, mainly SELECT based approach.

I would like to know if there is something specific for windows that uses async IO(completion ports ?) as I want to use it on a high performance proxy/socks server.

也许Boost :: ASIO是您要找的东西?

I can propose a C library I wrote for a network game. This library was intended for high volume simultaneous short TCP connections. It uses asynchronous epoll, kqueues, IOCP or synchronous threads. The interface is very simple and is abstracted thru a callback in the way node.js works. As an echo server, it can handle 60k requests per second. See https://github.com/freedib/gasio

As part of my open-source BadVPN software project , I have developed an event-driven (single-threaded) cross-platform network programming framework for the C language. It uses epoll on Linux and IOCP on Windows.

Some important parts:

It makes heavy use of flow-based programming . For instance, BConnection, the abstraction of TCP, uses the StreamPassInterface and StreamRecvInterface general-purpose stream I/O interfaces. This is very useful; for instance, if you need to add SSL support to you application, little more is needed than throwing a BSSLConnection object on top of BConnection.

While most of the framework is well-documented, I don't yet provide any guides on how to use it. You can use this basic program as a starting point. While not intended for learning, the tun2socks program and especially the the accompanying smaller udpgw program might be useful.

Since you mentioned SOCKS, in my framework I've also implemeted a very simple SOCKS5 client (no authentication etc.) which is used by tun2socks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM