Changeset 18740 for branches/FACT++_lidctrl_usb
- Timestamp:
- 01/30/17 11:27:28 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/FACT++_lidctrl_usb/src/lidctrl.cc
r18736 r18740 111 111 } 112 112 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) 114 114 { 115 115 CollectBytes(bytes_received); … … 130 130 } 131 131 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 ); 134 143 } 135 144 136 145 void ConnectionEstablished() 137 146 { 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)); 140 149 } 141 150
Note:
See TracChangeset
for help on using the changeset viewer.