Exception: Cybertrain::WebSocket::ClosedError

Inherits:
Error
  • Object
show all
Defined in:
cybertrain/websocket/frame.rb

Overview

The connection is closed: by a close frame (with its code and reason) or by the stream ending (code 1006).

Instance Attribute Summary collapse

Instance Attribute Details

#close_code ⇒ Integer (readonly)

Returns the close code (1006 when no close frame arrived).

Returns:

  • (Integer) —

    the close code (1006 when no close frame arrived)



61
62
63
# File 'cybertrain/websocket/frame.rb', line 61

def close_code
  @close_code
end

#close_reason ⇒ String (readonly)

Returns the close reason, possibly empty.

Returns:

  • (String) —

    the close reason, possibly empty



64
65
66
# File 'cybertrain/websocket/frame.rb', line 64

def close_reason
  @close_reason
end