Exemplo n.º 1
0
int HeartbeatAgent::destory()
{
    LOG_EVENT("Heartbeat Closed from IP " + TCPAgent::m_Addr.ip  
           + " AND Port : "+ ushort_to_str(TCPAgent::m_Addr.port) + 
           " Node type is " + type_str[m_type]);
    
    if(TCPAgent::recycler() < 0)
    {
        LOG_ERROR("HeartbeatAgent::recycler agent error !");
        return -1;
    }

    return 0;
}
Exemplo n.º 2
0
int HeartbeatAgent::recycler()
{
    HBManager::getInstance()->heartbeat_closed(this);
    LOG_EVENT("Heartbeat Closed from IP " + TCPAgent::m_Addr.ip  
           + " AND Port : "+ ushort_to_str(TCPAgent::m_Addr.port) + 
           " Node type is " + type_str[m_type]);
    
    if(TCPAgent::recycler() < 0)
    {
        LOG_ERROR("HeartbeatAgent::recycler agent error !");
        return -1;
    }

    return 0;
}
Exemplo n.º 3
0
void print_ushort(unsigned short number)
{
   print(ushort_to_str(number));
}