示例#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;
}
示例#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;
}
示例#3
0
文件: usart.c 项目: skyfex/happygem
void print_ushort(unsigned short number)
{
   print(ushort_to_str(number));
}