Changeset 18740


Ignore:
Timestamp:
01/30/17 11:27:28 (8 years ago)
Author:
(none)
Message:
increase wait from 1ms to 50ms; remove unused parameters
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/FACT++_lidctrl_usb/src/lidctrl.cc

    r18736 r18740  
    111111    }
    112112
    113     void HandleReceivedData(const boost::system::error_code&, size_t bytes_received, int bar, int foo)
     113    void HandleReceivedData(const boost::system::error_code&, size_t bytes_received)
    114114    {
    115115        CollectBytes(bytes_received);
     
    130130    }
    131131
    132     void DoAsyncRead(const bs::error_code &error){
    133         AsyncRead(ba::buffer(fRecievedBytes, 2 * sizeof(complete_message_t)), 0, 0);
     132    void DoAsyncRead(){
     133        async_read(
     134            *this,
     135            boost::asio::buffer(fRecievedBytes, 2 * sizeof(complete_message_t)),
     136            boost::bind(
     137                &ConnectionLid::HandleReceivedData,
     138                this,
     139                dummy::error,
     140                dummy::bytes_transferred
     141            )
     142        );
    134143    }
    135144
    136145    void ConnectionEstablished()
    137146    {
    138         fReadTimer.expires_from_now(boost::posix_time::milliseconds(1));
    139         fReadTimer.async_wait(boost::bind(&ConnectionLid::DoAsyncRead, this, dummy::error));
     147        fReadTimer.expires_from_now(boost::posix_time::milliseconds(50));
     148        fReadTimer.async_wait(boost::bind(&ConnectionLid::DoAsyncRead, this));
    140149    }
    141150
Note: See TracChangeset for help on using the changeset viewer.