Class: WebSocket::Frame::Handler::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/websocket/frame/handler/base.rb

Direct Known Subclasses

Handler03, Handler75

Instance Method Summary collapse

Constructor Details

#initialize(frame) ⇒ Base

Returns a new instance of Base.



7
8
9
# File 'lib/websocket/frame/handler/base.rb', line 7

def initialize(frame)
  @frame = frame
end

Instance Method Details

#decode_frameWebSocket::Frame::Incoming

Convert raw data to decoded frame

Returns:

Raises:

  • (NotImplementedError)


19
20
21
# File 'lib/websocket/frame/handler/base.rb', line 19

def decode_frame
  raise NotImplementedError
end

#encode_frameString

Convert data to raw frame ready to send to client

Returns:

  • (String)

    Encoded frame

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/websocket/frame/handler/base.rb', line 13

def encode_frame
  raise NotImplementedError
end