#[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
sourceimpl Clone for aws_websocket_send_frame_options
impl Clone for aws_websocket_send_frame_options
sourcefn clone(&self) -> aws_websocket_send_frame_options
fn clone(&self) -> aws_websocket_send_frame_options
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more