So we have some function like this:
void SendData (/* what goes here if we can only send to our function C POD types like int, uint etc? */ socket, std::string message)
{
boost::asio::io_service ioserv;
boost::asio::ip::tcp::socket s(ioserv);
s.assign(boost::asio::ip::tcp::v4(), socket);
s.send(boost::asio::buffer(message));
}
and from some other function we want to call SendData
having some boost::asio::ip::tcp::socket sock
... so something like:
//...
SendData(/* what goes here? Is there any sock.getInt() */, "message");
//...
So what are my options for this? What simple C POD types can be taken from boost::asio::ip::tcp::socket that could be later reinterpreted with .assign
?