Commit 60666d99 authored by jan.koester's avatar jan.koester
Browse files

test

parent 7d83aa3c
Loading
Loading
Loading
Loading
+18 −0
Changes for src/socket.h: 18 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -703,6 +703,20 @@ namespace netplus {
		// Cipher suite information
		uint16_t getSelectedCipher() const { return _selected_cipher; }

		// RFC 9000 §8.1.3: a client-side address-validation token issued by
		// the server after a successful handshake (via NEW_TOKEN). Save it
		// with getStoredToken() and hand it to setToken() on a later, separate
		// connection attempt (before calling connect()) to skip that
		// attempt's Retry round trip. Empty if no NEW_TOKEN has arrived yet
		// (e.g. mid-handshake, or this is a server-role object).
		const std::vector<uint8_t>& getStoredToken() const { return _received_new_token; }
		// Must be called before connect(). Accepts a token obtained from
		// either getStoredToken() on a prior connection, or from processRetryPacket()
		// internally (an application never needs to call this for the
		// Retry case — only for reusing a NEW_TOKEN across connections).
		void setToken(const std::vector<uint8_t>& token) { _pending_token = token; }


		// Stream data callback (for HTTP/3 handling in application layer)
		// Override base class method - internally wraps to quic-specific callback
		void setStreamCallback(StreamCallback cb) override {
@@ -952,6 +966,10 @@ namespace netplus {
		void processFinished(const std::vector<uint8_t>& msg);
		void sendClientFinished();
		void sendHandshakeDone();
		// Server-only, RFC 9000 §8.1.3: issued once per connection right
		// after HANDSHAKE_DONE, letting this client skip Retry on a future
		// reconnect by presenting the token via setToken().
		void sendNewTokenFrame();
		void sendHttp3ControlStreams();
		void completeHandshake();