Struct actix_web::ws::Frame [−][src]
A struct representing a WebSocket
frame.
Methods
impl Frame
[src]
[−]
impl Frame
pub fn unpack(self) -> (bool, OpCode, Binary)
[src]
[−]
pub fn unpack(self) -> (bool, OpCode, Binary)
Destruct frame
pub fn close(reason: Option<CloseReason>, genmask: bool) -> FramedMessage
[src]
[−]
pub fn close(reason: Option<CloseReason>, genmask: bool) -> FramedMessage
Create a new Close control frame.
pub fn parse<S>(
pl: &mut PayloadBuffer<S>,
server: bool,
max_size: usize
) -> Poll<Option<Frame>, ProtocolError> where
S: Stream<Item = Bytes, Error = PayloadError>,
[src]
[−]
pub fn parse<S>(
pl: &mut PayloadBuffer<S>,
server: bool,
max_size: usize
) -> Poll<Option<Frame>, ProtocolError> where
S: Stream<Item = Bytes, Error = PayloadError>,
Parse the input stream into a frame.
pub fn parse_close_payload(payload: &Binary) -> Option<CloseReason>
[src]
[−]
pub fn parse_close_payload(payload: &Binary) -> Option<CloseReason>
Parse the payload of a close frame.
pub fn message<B: Into<Binary>>(
data: B,
code: OpCode,
finished: bool,
genmask: bool
) -> FramedMessage
[src]
[−]
pub fn message<B: Into<Binary>>(
data: B,
code: OpCode,
finished: bool,
genmask: bool
) -> FramedMessage
Generate binary representation