Changeset 10862
- Timestamp:
- 05/27/11 13:36:37 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/fad.cc
r10853 r10862 381 381 void start_accept() 382 382 { 383 cout << "Start accept ..." << flush;383 cout << "Start accept " << acc0.local_endpoint().port() << "..." << flush; 384 384 tcp_connection::shared_ptr new_connection = tcp_connection::create(/*acceptor_.*/acc0.io_service()); 385 385 … … 427 427 ba::io_service io_service; 428 428 429 int port = argc==2 ? lexical_cast<int>(argv[1]) : 5000; 430 431 tcp_server server(io_service, port); 429 int port = argc>=2 ? lexical_cast<int>(argv[1]) : 5000; 430 int n = argc==3 ? lexical_cast<int>(argv[2]) : 1; 431 432 vector<shared_ptr<tcp_server>> servers; 433 434 for (int i=0; i<n; i++) 435 { 436 shared_ptr<tcp_server> server(new tcp_server(io_service, port)); 437 servers.push_back(server); 438 439 port += 8; 440 } 432 441 433 442 // ba::add_service(io_service, &server);
Note:
See TracChangeset
for help on using the changeset viewer.