コード例 #1
0
 /**
  * The a particular socket's connection failed
  * This function will call all substreams disconnected methods
  */
 template <class ErrorCode> void hostDisconnectedCallback(const ASIOSocketWrapper* whichSocket, const ErrorCode &error) {
     unsigned int which=0;
     for (std::vector<ASIOSocketWrapper>::iterator i=mSockets.begin(),ie=mSockets.end(); i!=ie; ++i,++which) {
         if (&*i==whichSocket)
             break;
     }
     hostDisconnectedCallback(which==mSockets.size()?0:which,error.message());
 }
コード例 #2
0
ファイル: openweathermap.cpp プロジェクト: dlinten/sober
 virtual bool restart_on_error(const ErrorCode& error) override {
   std::cerr << "Error: " << error.message() << std::endl;
   return false;
 }
コード例 #3
0
 /**
  * The a particular socket's connection failed
  * This function will call all substreams disconnected methods
  */
 template <class ErrorCode> void connectionFailedCallback(unsigned int whichSocket, const ErrorCode& error) {
     connectionFailedCallback(whichSocket,error.message());
 }
コード例 #4
0
 /**
  * The a particular socket's connection failed
  * This function will call all substreams disconnected methods
  */
 template <class ErrorCode> void hostDisconnectedCallback(unsigned int whichSocket, const ErrorCode& error) {
     hostDisconnectedCallback(whichSocket,error.message());
 }
コード例 #5
0
 /**
  * The connection failed to connect before any sockets had been established (ex: host not found)
  * This function will call all substreams disconnected methods
  */
 template <class ErrorCode> void connectionFailedCallback(const ErrorCode& error) {
     connectionFailedCallback(error.message());
 }