class WebSocket::Frame::Outgoing
frame.to_s # “x81x05x48x65x6cx6cx6f”
frame = WebSocket::Frame::Outgoing::Server.new(version: @handshake.version, data: “Hello”, type: :text)
@example
@note You should NEVER use this class directly - use Client or Server subclasses instead, as they contain additional frame options(i.e. Client-side masking in draft 04)
Construct or parse outgoing WebSocket Frame.
def require_sending?
-
(Boolean)
- true if frame should be sent
def require_sending? !error? end
def supported?
-
(Boolean)
- true if frame type is supported
def supported? support_type? end
def to_s
def to_s raise WebSocket::Error::Frame::UnknownFrameType unless supported? @handler.encode_frame end