libhttp2.session

Session

Members

Classes

Session
class Session
Undocumented in source.

Enums

CLIENT
anonymousenum CLIENT
Undocumented in source.
GoAwayFlags
enum GoAwayFlags
Undocumented in source.
InboundState
enum InboundState

Internal state when receiving incoming frame

OptionFlags
enum OptionFlags

Configuration options

OptionsMask
enum OptionsMask
Undocumented in source.
OutboundState
enum OutboundState
Undocumented in source.

Functions

isFatal
bool isFatal(int lib_error)

Returns true if the RV library error code |lib_error| is fatal.

packSettingsPayload
int packSettingsPayload(ubyte[] buf, Setting[] iva)

@function

selectNextProtocol
int selectNextProtocol(ubyte[] output, ubyte[] input, ubyte[] other_proto)

A helper function for dealing with NPN in client side or ALPN in server side. The |input| contains peer's protocol list in preferable order. The format of |input| is length-prefixed and not null-terminated. For example, HTTP-draft-04/2.0 and http/1.1 stored in |input| like this::

submitData
ErrorCode submitData(Session session, FrameFlags flags, int stream_id, DataProvider data_prd)

Submits one or more DATA frames to the stream |stream_id|. The data to be sent are provided by |data_prd|. If |flags| contains FrameFlags.END_STREAM, the last DATA frame has END_STREAM flag set.

submitGoAway
ErrorCode submitGoAway(Session session, int last_stream_id, FrameError error_code, string opaque_data)

@function

submitHeaders
int submitHeaders(Session session, FrameFlags flags, int stream_id, PrioritySpec pri_spec, HeaderField[] hfa, void* stream_user_data)

Submits HEADERS frame. The |flags| is bitwise OR of the following values:

submitPing
void submitPing(Session session, ubyte[] opaque_data)

Submits PING frame. You don't have to send PING back when you received PING frame. The library automatically submits PING frame in this case.

submitPriority
ErrorCode submitPriority(Session session, int stream_id, PrioritySpec pri_spec)

Submits PRIORITY frame to change the priority of stream |stream_id| to the priority specification |pri_spec|.

submitPushPromise
int submitPushPromise(Session session, int stream_id, HeaderField[] hfa, void* promised_stream_user_data)

Submits PUSH_PROMISE frame.

submitRequest
int submitRequest(Session session, PrioritySpec pri_spec, HeaderField[] hfa, DataProvider data_prd, void* stream_user_data)

Submits HEADERS frame and optionally one or more DATA frames.

submitResponse
ErrorCode submitResponse(Session session, int stream_id, HeaderField[] hfa, DataProvider data_prd)

Submits response HEADERS frame and optionally one or more DATA frames against the stream |stream_id|.

submitRstStream
ErrorCode submitRstStream(Session session, int stream_id, FrameError error_code)

@function

submitSettings
ErrorCode submitSettings(Session session, Setting[] iva)

@function

submitShutdownNotice
ErrorCode submitShutdownNotice(Session session)

Signals to the client that the server started graceful shutdown procedure.

submitWindowUpdate
ErrorCode submitWindowUpdate(Session session, int stream_id, int window_size_increment)

Submits WINDOW_UPDATE frame.

Structs

ActiveOutboundItem
struct ActiveOutboundItem
Undocumented in source.
InboundFrame
struct InboundFrame
Undocumented in source.
Options
struct Options

Struct to store option values for http2_session.

SettingsStorage
struct SettingsStorage
Undocumented in source.

Meta

License

Distributed under the terms of the MIT license with an additional section 1.2 of the curl/libcurl project. Consult the provided LICENSE.md file for details