Is there such framework or lib? That will take care of the client/server sockets parts too? Or just using something like BOOST::ASIO is the standard practice with开发者_StackOverflow中文版 protobuf?
I use ZeroMQ together with protobuf.
I had hard time finding such a framework, so I wrote some (TLS) socket wrappers and a simple protobuf message channel. The library is available at prototls.
I use boost::asio and Poco::Net with protobuf, you dont need a specific framework or library to use a protobuf message, you dont even have to use a protobuf message just on network only, it creates binary version of that message that means you can transfer that binary data thorught network, store it on a file etc.
I would recommend to build your own protocol just for the sake of learning socket programming :-) using whatever socket library you want, winsock, boost::asio, Poco::Net, etc, Where boost::asio is the easier one using the async_ methods. I build a network framework in 5 hours (server/client) with multithreading capabilities
Again like many people said, boost::asio is the way to go, having an extra library just for something really simple (with boost) it's a waste.
精彩评论