Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jun 13th, 2011  |  syntax: C++  |  size: 0.39 KB  |  views: 53  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #pragma once
  2.  
  3. #include "session.h"
  4.  
  5. #include <boost/bind.hpp>
  6. #include <boost/asio.hpp>
  7.  
  8. using boost::asio::ip::tcp;
  9.  
  10.  
  11. class server
  12. {
  13. public:
  14.  
  15.         server(boost::asio::io_service& io_service, short port);
  16.  
  17. private:
  18.  
  19.         void handle_accept(session* new_session,
  20.                 const boost::system::error_code& error);
  21.  
  22. private:
  23.  
  24.         boost::asio::io_service& io_service_;
  25.         tcp::acceptor acceptor_;
  26. };