c++ - TCP server with state information using network library -


i'm writing tcp server online turn-based game. i've written prototype using php sockets, move c++. i've been looking @ popular network libraries (asio, ace, poco, libevent), unclear 1 best suit needs:

1) connections persistent (on order of minutes), , server must able handle 100+ simultaneous connections.

2) connections must able maintain state information (user login info). [my php prototype requires each client request contain login info]

3) optionally , preferably multi-threaded, single process. prefer not have 1 thread per connection, fixed number of threads working on open connections.


i'm leaning towards poco's tcpserver or reactor frameworks, not sure if meet requirements. think reactor single threaded, , tcpserver enforces 1:1 threading/connection. correct?


in either case case, i'm not sure how important task of associating login info specific connection connections coming , going @ random.

boost.asio should meet requirements. reactor queue can serviced multiple threads. using asynchronous methods enable design of fixed number of threads servicing connections.

the tutorials , examples best place start if unfamiliar library.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -