Exception: Webtube::BrokenFrame

Inherits:
ProtocolError show all
Defined in:
lib/webtube.rb

Overview

Indicates that a complete frame could not be read from the underlying TCP connection.

[Webtube::Frame::read_from_socket]

will also give it the

partial frame as a string so it could be further analysed, but this is optional.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ProtocolError

#websocket_close_status_code

Constructor Details

#initialize(message = "no complete WebSocket frame was available", partial_frame = nil) ⇒ BrokenFrame

Returns a new instance of BrokenFrame.



885
886
887
888
889
890
891
# File 'lib/webtube.rb', line 885

def initialize message =
        "no complete WebSocket frame was available",
    partial_frame = nil
  super message
  @partial_frame = partial_frame
  return
end

Instance Attribute Details

#partial_frameObject (readonly)

Returns the value of attribute partial_frame.



883
884
885
# File 'lib/webtube.rb', line 883

def partial_frame
  @partial_frame
end