Commit a5f83cc2 authored by jan.koester's avatar jan.koester
Browse files

test

parent 15d2446b
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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; }

@@ -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;
+5 −0
Original line number Diff line number Diff line
@@ -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);
    }