fix(NetSSL_Win): Non-blocking sockets support #4773

This commit is contained in:
Günter Obiltschnig
2024-11-16 16:50:52 +01:00
parent bf09be3f33
commit 7780f379ea
11 changed files with 479 additions and 28 deletions

View File

@@ -207,6 +207,12 @@ public:
int available() const;
/// Returns the number of bytes available in the buffer.
SocketImpl* socket();
/// Returns the underlying SocketImpl.
const SocketImpl* socket() const;
/// Returns the underlying SocketImpl.
protected:
enum
{
@@ -294,6 +300,8 @@ private:
Poco::Buffer<BYTE> _overflowBuffer;
Poco::Buffer<BYTE> _sendBuffer;
DWORD _sendBufferOffset;
DWORD _sendBufferPending;
Poco::Buffer<BYTE> _recvBuffer;
DWORD _recvBufferOffset;
DWORD _ioBufferSize;
@@ -316,6 +324,18 @@ private:
//
// inlines
//
inline SocketImpl* SecureSocketImpl::socket()
{
return _pSocket.get();
}
inline const SocketImpl* SecureSocketImpl::socket() const
{
return _pSocket.get();
}
inline poco_socket_t SecureSocketImpl::sockfd()
{
return _pSocket->sockfd();

View File

@@ -197,6 +197,12 @@ public:
/// Returns true iff a reused session was negotiated during
/// the handshake.
// SocketImpl
virtual void setBlocking(bool flag) override;
virtual bool getBlocking() const override;
virtual void setRawOption(int level, int option, const void* value, poco_socklen_t length) override;
virtual void getRawOption(int level, int option, void* value, poco_socklen_t& length) override;
protected:
void acceptSSL();
/// Performs a SSL server-side handshake.