Loading src/socket.h +1 −4 Original line number Diff line number Diff line Loading @@ -420,11 +420,9 @@ namespace netplus { #endif bool hasPendingWrite() const override { return _tls.hasPendingWrite() || _pendingIocpWrite.load(); return _tls.hasPendingWrite() || socket::_pendingIocpWrite.load(); } void setPendingWrite(bool pending) override { _pendingIocpWrite.store(pending); } bool getHandshakeDone() override { return _tls.getHandshakeDone(); } bool isClient() const override { return _tls.is_client; } Loading Loading @@ -480,7 +478,6 @@ namespace netplus { ssl(std::shared_ptr<const std::map<std::string, CertificateBundle>> shared_certs); tls _tls; FramingCallback _framing_cb; std::atomic<bool> _pendingIocpWrite{false}; #ifdef Windows AcceptContext _acpt; Loading src/windows/tcp.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -181,6 +181,11 @@ size_t tcp::sendData(buffer& data, int flags) { } // IOCP-bound server sockets: use overlapped WSASend if (_pendingIocpWrite.load()) { NetException e; e[NetException::Note] << "tcp::sendData: IOCP write pending"; throw e; } if (!_SendBuffer) { _SendBuffer = std::make_unique<buffer>(sendlen); } Loading Loading
src/socket.h +1 −4 Original line number Diff line number Diff line Loading @@ -420,11 +420,9 @@ namespace netplus { #endif bool hasPendingWrite() const override { return _tls.hasPendingWrite() || _pendingIocpWrite.load(); return _tls.hasPendingWrite() || socket::_pendingIocpWrite.load(); } void setPendingWrite(bool pending) override { _pendingIocpWrite.store(pending); } bool getHandshakeDone() override { return _tls.getHandshakeDone(); } bool isClient() const override { return _tls.is_client; } Loading Loading @@ -480,7 +478,6 @@ namespace netplus { ssl(std::shared_ptr<const std::map<std::string, CertificateBundle>> shared_certs); tls _tls; FramingCallback _framing_cb; std::atomic<bool> _pendingIocpWrite{false}; #ifdef Windows AcceptContext _acpt; Loading
src/windows/tcp.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -181,6 +181,11 @@ size_t tcp::sendData(buffer& data, int flags) { } // IOCP-bound server sockets: use overlapped WSASend if (_pendingIocpWrite.load()) { NetException e; e[NetException::Note] << "tcp::sendData: IOCP write pending"; throw e; } if (!_SendBuffer) { _SendBuffer = std::make_unique<buffer>(sendlen); } Loading