How to create simple tcp_connect and tcp_write functions?
So I need2 functions: 1) tcp_connect
that would try to connect to tcp adress (given string like tcp://123.123.123.123:33333/
) capable of returning some bool if connection was sucsessfull and simple tcp_write
function capable to write a buffer of given langth on to opened connection. So where to get how to do it with boost? (pleas开发者_JAVA百科e provide code, it will be appreciated)
btw: how can we input into it normal url like tcp://www.bla-bla.com:port?
boost::asio, and here is the code you need: http://www.boost.org/doc/libs/1_44_0/doc/html/boost_asio/examples.html
精彩评论