Ejemplo n.º 1
0
inline
void CRPCClient<TRequest, TReply>::x_Connect(void)
{
    _ASSERT( !m_Service.empty() );
    SConnNetInfo* net_info = ConnNetInfo_Create(m_Service.c_str());
    if (!m_Affinity.empty()) {
        ConnNetInfo_PostOverrideArg(net_info, m_Affinity.c_str(), 0);
    }
    x_SetStream(new CConn_ServiceStream(m_Service, fSERV_Any, net_info, 0,
                                        m_Timeout));
    ConnNetInfo_Destroy(net_info);
}
Ejemplo n.º 2
0
// override x_Connect to allow for connection to host:port
void
CTrackMgrClient::x_Connect(void)
{
    switch (m_HostType) {
    case eHost_port:
        _ASSERT(!m_Host.empty());
        x_SetStream(new CConn_SocketStream(m_Host, m_Port));
        break;

    case eNamed_service:
        CTrackMgrClient_Base::x_Connect();
        break;
    }
}
Ejemplo n.º 3
0
inline
void CRPCClient<TRequest, TReply>::x_ConnectURL(const string& url)
{
    x_SetStream(new CConn_HttpStream(url, fHTTP_AutoReconnect, m_Timeout));
}