#[repr(C)]
pub struct aws_websocket_send_frame_options { pub payload_length: u64, pub user_data: *mut c_void, pub stream_outgoing_payload: aws_websocket_stream_outgoing_payload_fn, pub on_complete: aws_websocket_outgoing_frame_complete_fn, pub opcode: u8, pub fin: bool, pub high_priority: bool, pub rsv: [bool; 3], }
Expand description

Options for sending a websocket frame. This structure is copied immediately by aws_websocket_send(). For descriptions of opcode, fin, rsv, and payload_length see in RFC-6455 Section 5.2.

Fields

payload_length: u64

Size of payload to be sent via stream_outgoing_payload callback.

user_data: *mut c_void

User data passed to callbacks.

stream_outgoing_payload: aws_websocket_stream_outgoing_payload_fn

Callback for sending payload data. See aws_websocket_stream_outgoing_payload_fn. Required if payload_length is non-zero.

on_complete: aws_websocket_outgoing_frame_complete_fn

Callback for completion of send operation. See aws_websocket_outgoing_frame_complete_fn. Optional.

opcode: u8

Frame type. aws_websocket_opcode enum provides standard values.

fin: bool

Indicates that this is the final fragment in a message. The first fragment MAY also be the final fragment.

high_priority: bool

If true, frame will be sent before those with normal priority. Useful for opcodes like PING and PONG where low latency is important. This feature may only be used with “control” opcodes, not “data” opcodes like BINARY and TEXT.

rsv: [bool; 3]

MUST be 0 unless an extension is negotiated that defines meanings for non-zero values.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.