aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Common/checkSSLReturnCode.cpp
blob: 05d4c24358b0df7ccba2e4c92e87a5ca711c6c54 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <Common/checkSSLReturnCode.h>
#include "clickhouse_config.h"

#if USE_SSL
#include <Poco/Net/SecureStreamSocket.h>
#endif

namespace DB
{

bool checkSSLWantRead([[maybe_unused]] ssize_t ret)
{
#if USE_SSL
    return ret == Poco::Net::SecureStreamSocket::ERR_SSL_WANT_READ;
#else
    return false;
#endif
}

bool checkSSLWantWrite([[maybe_unused]] ssize_t ret)
{
#if USE_SSL
    return ret == Poco::Net::SecureStreamSocket::ERR_SSL_WANT_WRITE;
#else
    return false;
#endif
}

}