class WebSocket::Frame::Handler::Base
def control_frame?(frame_type)
-
(Boolean)
- True if given frame type is control frame
Parameters:
-
frame_type
(Symbol
) -- Frame type
def control_frame?(frame_type) !%i[text binary continuation].include?(frame_type) end
def data_frame?(frame_type)
-
(Boolean)
- True if given frame type is data frame
Parameters:
-
frame_type
(Symbol
) -- Frame type
def data_frame?(frame_type) %i[text binary].include?(frame_type) end
def decode_frame
-
(WebSocket::Frame::Incoming)
- Frame if found, nil otherwise
def decode_frame raise NotImplementedError end
def encode_frame
-
(String)
- Encoded frame
def encode_frame raise NotImplementedError end
def initialize(frame)
def initialize(frame) @frame = frame end