mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-01 09:24:55 +02:00
feat(SecureSocketImpl): how to set the socket of SecureSocketImpl to no-blocking? #2352
This commit is contained in:
parent
0d539a71f5
commit
5d7a1016c2
@ -161,6 +161,15 @@ public:
|
|||||||
/// underlying TCP connection. No orderly SSL shutdown
|
/// underlying TCP connection. No orderly SSL shutdown
|
||||||
/// is performed.
|
/// is performed.
|
||||||
|
|
||||||
|
void setBlocking(bool flag);
|
||||||
|
/// Sets the socket in blocking mode if flag is true,
|
||||||
|
/// disables blocking mode if flag is false.
|
||||||
|
|
||||||
|
bool getBlocking() const;
|
||||||
|
/// Returns the blocking mode of the socket.
|
||||||
|
/// This method will only work if the blocking modes of
|
||||||
|
/// the socket are changed via the setBlocking method!
|
||||||
|
|
||||||
int sendBytes(const void* buffer, int length, int flags = 0);
|
int sendBytes(const void* buffer, int length, int flags = 0);
|
||||||
/// Sends the contents of the given buffer through
|
/// Sends the contents of the given buffer through
|
||||||
/// the socket. Any specified flags are ignored.
|
/// the socket. Any specified flags are ignored.
|
||||||
|
@ -311,6 +311,22 @@ void SecureSocketImpl::close()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SecureSocketImpl::setBlocking(bool flag)
|
||||||
|
{
|
||||||
|
poco_check_ptr (_pSocket);
|
||||||
|
|
||||||
|
_pSocket->setBlocking(flag);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool SecureSocketImpl::getBlocking() const
|
||||||
|
{
|
||||||
|
poco_check_ptr (_pSocket);
|
||||||
|
|
||||||
|
return _pSocket->getBlocking();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int SecureSocketImpl::sendBytes(const void* buffer, int length, int flags)
|
int SecureSocketImpl::sendBytes(const void* buffer, int length, int flags)
|
||||||
{
|
{
|
||||||
poco_assert (_pSocket->initialized());
|
poco_assert (_pSocket->initialized());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user