| 344 | |
| 345 | |
| 346 | static Result CreateSSLSocket(dmSocket::Socket socket, const char* host, int timeout, dmSSLSocket::Socket* sslsocket, dmSocket::Result* sock_res) |
| 347 | { |
| 348 | dmSSLSocket::Result result = dmSSLSocket::New(socket, host, timeout, sslsocket); |
| 349 | if (dmSSLSocket::RESULT_OK != result) |
| 350 | { |
| 351 | if (dmSSLSocket::RESULT_WOULDBLOCK == result) |
| 352 | { |
| 353 | *sock_res = dmSocket::RESULT_WOULDBLOCK; |
| 354 | } |
| 355 | else if (dmSSLSocket::RESULT_CONNREFUSED == result) |
| 356 | { |
| 357 | *sock_res = dmSocket::RESULT_CONNREFUSED; |
| 358 | } |
| 359 | else |
| 360 | { |
| 361 | *sock_res = dmSocket::RESULT_UNKNOWN; |
| 362 | } |
| 363 | return RESULT_HANDSHAKE_FAILED; |
| 364 | } |
| 365 | return RESULT_OK; |
| 366 | } |
| 367 | |
| 368 | |
| 369 | Result CreateSSLSocket(HPool pool, HConnection connection, const char* host, int timeout, dmSocket::Result* sock_res) |