FACT++  1.0
void Connection::HandleSentData ( const boost::system::error_code &  error,
size_t   
)
private

Definition at line 166 of file Connection.cc.

References Debug, Error(), HandleWriteTimeout(), PostMessage(), and str.

Referenced by AsyncWait(), and AsyncWrite().

167 {
168  if (error==ba::error::basic_errors::operation_aborted)
169  return;
170 
171  if (error && error != ba::error::not_connected)
172  {
173  ostringstream str;
174  str << "Writing to " << URL() << ": " << error.message() << " (" << error << ")";// << endl;
175  Error(str);
176 
177  CloseImp();
178  return;
179  }
180 
181  if (error == ba::error::not_connected)
182  {
183  ostringstream msg;
184  msg << n << " bytes could not be sent to " << URL() << " due to missing connection.";
185  Warn(msg);
186 
187  return;
188  }
189 
190  if (--fQueueSize==0)
191  fOutTimeout.cancel();
192 
193  if (fDebugTx)
194  {
195  ostringstream msg;
196  msg << n << " bytes successfully sent to " << URL();
197  Debug(msg);
198  }
199 }
int Debug(const std::string &str)
Definition: MessageImp.h:45
char str[80]
Definition: test_client.c:7
void CloseImp(bool restart=true)
Definition: Connection.cc:89
bool fDebugTx
Definition: Connection.h:26
std::string URL() const
Definition: Connection.h:151
int Error(const std::string &str)
Definition: MessageImp.h:49
int Warn(const std::string &str)
Definition: MessageImp.h:48
boost::asio::deadline_timer fOutTimeout
Definition: Connection.h:39
size_t fQueueSize
Definition: Connection.h:42

+ Here is the call graph for this function:

+ Here is the caller graph for this function: