TsgcHTTP3Client › Methods › SetMaxPushId

SetMaxPushId Method

Sends a MAX_PUSH_ID frame that raises the highest push ID the client will accept.

Syntax

procedure SetMaxPushId(aMaxPushId: Int64);

Parameters

NameTypeDescription
aMaxPushIdInt64Highest push ID the server is allowed to use. Pass 0 to allow a single push (push ID 0), or a higher value to allow more.

Return Value

None.

Remarks

SetMaxPushId sends a MAX_PUSH_ID frame on the client control stream, as defined in RFC 9114 Section 7.2.7. Server push is disabled until the client sends this frame, because a server may only push with an ID lower than or equal to the value the client announced. Call it to opt in to server push.

The value is cumulative and may only grow over the life of the connection: a server treats a MAX_PUSH_ID that lowers the limit as a connection error. To stop an individual push that has already been promised, use CancelPush instead.

The method can be called before Connect. When the control stream is not open yet the value is stored and the frame is sent automatically once the connection has been established.

Example



oClient.OnPush := OnPushEvent;

// accept pushes with ids 0..9

oClient.SetMaxPushId(9);

oClient.Connect('www.example.com', 443);

Back to Methods