class WebSocket::Frame::Handler::Base

def control_frame?(frame_type)

Returns:
  • (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)

Returns:
  • (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

Returns:
  • (WebSocket::Frame::Incoming) - Frame if found, nil otherwise
def decode_frame
  raise NotImplementedError
end

def encode_frame

Returns:
  • (String) - Encoded frame
def encode_frame
  raise NotImplementedError
end

def initialize(frame)

def initialize(frame)
  @frame = frame
end