FACT++  1.0
void tcp_server::start_accept ( )
inlineprivate

Definition at line 553 of file fad.cc.

References tcp_connection::create(), fBoardId, and handle_accept().

554  {
555  cout << "Start accept[" << fBoardId << "] " << acc0.local_endpoint().port() << "..." << flush;
556  tcp_connection::shared_ptr new_connection = tcp_connection::create(/*acceptor_.*/acc0.get_io_service(), fBoardId);
557 
558  cout << new_connection.get() << " ";
559 
560  // This will accept a connection without blocking
561  acc0.async_accept(*new_connection,
562  boost::bind(&tcp_server::handle_accept,
563  this,
564  new_connection,
565  ba::placeholders::error));
566 
567  start_accept(new_connection, acc1);
568  start_accept(new_connection, acc2);
569  start_accept(new_connection, acc3);
570  start_accept(new_connection, acc4);
571  start_accept(new_connection, acc5);
572  start_accept(new_connection, acc6);
573  start_accept(new_connection, acc7);
574 
575  cout << "start-done." << endl;
576  }
tcp::acceptor acc5
Definition: fad.cc:514
tcp::acceptor acc6
Definition: fad.cc:515
tcp::acceptor acc4
Definition: fad.cc:513
void start_accept()
Definition: fad.cc:553
void handle_accept(tcp_connection::shared_ptr new_connection, const boost::system::error_code &error)
Definition: fad.cc:578
tcp::acceptor acc1
Definition: fad.cc:510
tcp::acceptor acc0
Definition: fad.cc:509
boost::shared_ptr< tcp_connection > shared_ptr
Definition: fad.cc:431
int fBoardId
Definition: fad.cc:518
tcp::acceptor acc7
Definition: fad.cc:516
tcp::acceptor acc3
Definition: fad.cc:512
tcp::acceptor acc2
Definition: fad.cc:511
static shared_ptr create(ba::io_service &io_service, int boardid)
Definition: fad.cc:433

+ Here is the call graph for this function: