FACT++  1.0
void ConnectionGPS::HandleRequest ( const bs::error_code &  error)
inlineprivate

Definition at line 241 of file gpsctrl.cc.

References Error(), and str.

Referenced by Request().

242  {
243  // 125: Operation canceled (bs::error_code(125, bs::system_category))
244  if (error && error!=ba::error::basic_errors::operation_aborted)
245  {
246  ostringstream str;
247  str << "Write timeout of " << URL() << ": " << error.message() << " (" << error << ")";// << endl;
248  Error(str);
249 
250  PostClose(false);
251  return;
252  }
253 
254  if (!is_open())
255  {
256  // For example: Here we could schedule a new accept if we
257  // would not want to allow two connections at the same time.
258  PostClose(true);
259  return;
260  }
261 
262  // Check whether the deadline has passed. We compare the deadline
263  // against the current time since a new asynchronous operation
264  // may have moved the deadline before this actor had a chance
265  // to run.
266  if (fKeepAlive.expires_at() > ba::deadline_timer::traits_type::now())
267  return;
268 
269  PostMessage(string("get_status\r\n"), 12);
270  Request();
271  }
char str[80]
Definition: test_client.c:7
void Request(bool immediate=false)
Definition: gpsctrl.cc:300
Error()
Definition: HeadersFTM.h:197
boost::asio::deadline_timer fKeepAlive
Definition: gpsctrl.cc:239

+ Here is the call graph for this function:

+ Here is the caller graph for this function: