SHARE
TWEET

Untitled

a guest Jun 20th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tcp::socket some_socket(my_io_service);
  2. tcp::endpoint endpoint(tcp::v4(), 1337);
  3. tcp::acceptor acceptor(my_io_service, endpoint);
  4. acceptor.accept(some_socket);
  5.      
  6. tcp::socket some_socket(my_io_service);
  7. tcp::resolver::query query("127.0.0.1", 1337);
  8. tcp::resolver resolver(my_io_service);
  9. tcp::resolver::iterator endpoint = resolver.resolve(query);
  10. boost::asio::connect(some_socket, endpoint)
  11.      
  12. tcp::socket some_socket(my_io_service);
  13. tcp::endpoint endpoint(tcp::v4(), 1337);
  14. tcp::acceptor acceptor(my_io_service, endpoint.protocol());
  15. acceptor.bind(endpoint);
  16. acceptor.accept(some_socket);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top