259 const string host = endpoint.port()==0 ?
"" :
260 endpoint.address().to_string()+
':'+to_string((
long long unsigned int)endpoint.port());
265 set_option(socket_base::keep_alive(
true));
267 const int optval = 30;
269 setsockopt(native(), SOL_TCP, TCP_KEEPIDLE, &optval,
sizeof(optval));
271 setsockopt(native(), SOL_TCP, TCP_KEEPINTVL, &optval,
sizeof(optval));
274 Info(
"Connection established to "+host+
"...");
292 msg <<
"Connecting to " << host <<
": " << error.message() <<
" (" << error <<
")";
296 if (error!=ba::error::basic_errors::connection_refused)
302 if (error==ba::error::basic_errors::operation_aborted)
void CloseImp(bool restart=true)
ConnectionStatus_t fConnectionStatus
int Warn(const std::string &str)
int Info(const std::string &str)
virtual void ConnectionEstablished()