| 209 | }; |
| 210 | |
| 211 | Result Response::Connect(const char* host, uint16_t port, bool secure, int timeout, int* canceled) |
| 212 | { |
| 213 | m_Pool = g_PoolCreator.GetPool(); |
| 214 | dmConnectionPool::Result r = dmConnectionPool::Dial(m_Pool, host, port, secure, timeout, canceled, &m_Connection, &m_Client->m_SocketResult); |
| 215 | |
| 216 | if (r == dmConnectionPool::RESULT_OK) { |
| 217 | |
| 218 | m_Socket = dmConnectionPool::GetSocket(m_Pool, m_Connection); |
| 219 | m_SSLSocket = dmConnectionPool::GetSSLSocket(m_Pool, m_Connection); |
| 220 | |
| 221 | dmSocket::SetSendTimeout(m_Socket, SOCKET_TIMEOUT); |
| 222 | dmSocket::SetReceiveTimeout(m_Socket, SOCKET_TIMEOUT); |
| 223 | |
| 224 | return RESULT_OK; |
| 225 | } else { |
| 226 | return RESULT_SOCKET_ERROR; |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | Result Response::CreateSSLSocket(const char* host, int timeout) |
| 231 | { |
no test coverage detected