Changeset 10846 for trunk/FACT++/src


Ignore:
Timestamp:
05/26/11 23:36:02 (13 years ago)
Author:
tbretz
Message:
Start to listen on eight ports like the FAD boards.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/fad.cc

    r10826 r10846  
    2323using boost::lexical_cast;
    2424using ba::ip::tcp;
    25 
    26 int Port = 0;
    27 
    28 // ------------------------------------------------------------------------
    29 
    3025
    3126// ------------------------------------------------------------------------
     
    330325                                 ba::placeholders::error));
    331326
     327
    332328        cout << "start-done." << endl;
    333329    }
     
    358354        ba::io_service io_service;
    359355
    360         Port = argc==2 ? lexical_cast<int>(argv[1]) : 5000;
    361 
    362         tcp_server server(io_service, Port);
     356        int port = argc==2 ? lexical_cast<int>(argv[1]) : 5000;
     357
     358        tcp_server server(io_service, port);
     359
     360        tcp::acceptor acc1(io_service, tcp::endpoint(tcp::v4(), port+1));
     361        tcp::acceptor acc2(io_service, tcp::endpoint(tcp::v4(), port+2));
     362        tcp::acceptor acc3(io_service, tcp::endpoint(tcp::v4(), port+3));
     363        tcp::acceptor acc4(io_service, tcp::endpoint(tcp::v4(), port+4));
     364        tcp::acceptor acc5(io_service, tcp::endpoint(tcp::v4(), port+5));
     365        tcp::acceptor acc6(io_service, tcp::endpoint(tcp::v4(), port+6));
     366        tcp::acceptor acc7(io_service, tcp::endpoint(tcp::v4(), port+7));
     367
    363368        //  ba::add_service(io_service, &server);
    364369        //  server.add_service(...);
Note: See TracChangeset for help on using the changeset viewer.