예제 #1
0
OsSocket* SipTlsServer::buildClientSocket(int hostPort, const char* hostAddress, const char* localIp, bool& existingSocketReused)
{
   OsSocket* socket;
   socket = new OsSSLConnectionSocket(hostPort, hostAddress);

   socket->makeBlocking();
   existingSocketReused = false;
   return(socket);
}
예제 #2
0
OsSocket* SipTlsServer::buildClientSocket(int hostPort, const char* hostAddress, const char* localIp)
{
    OsSocket* socket = NULL;
#ifdef SIP_TLS
#   ifdef SIP_TLS_NSS
       socket = new OsTLSClientConnectionSocket(hostPort, hostAddress, mCertNickname, mCertPassword, mDbLocation, 0, localIp, mSipUserAgent);
#   else
       socket = new OsSSLConnectionSocket(hostPort, hostAddress);
#   endif
#else
    // Create the socket in non-blocking mode so it does not block
    // while conecting
    socket = new OsConnectionSocket(hostPort, hostAddress, FALSE, localIp);
#endif
   if (socket)
   {
      socket->makeBlocking();
   }
   return(socket);
}