Exception: LibWebSocket::Frame::Error

Inherits:
Error
  • Object
show all
Defined in:
lib/libwebsocket/frame/error.rb

Overview

Generic close error command for frame. Should not be called directly - use one of subclasses. This should be catched and responded to according to clean_close? and status.

Defined Under Namespace

Classes: AbnormalClosure, GoingAway, InvalidFramePayloadData, MandatoryExtension, MessageTooBig, NoStatusRcvd, NormalClosure, PolicyViolation, ProtocolError, UnsupportedData

Instance Method Summary collapse

Instance Method Details

#clean_close?Boolean

Should close frame be sent before closing? If so then status code should be used to build it.

Returns:

  • (Boolean)


10
11
12
# File 'lib/libwebsocket/frame/error.rb', line 10

def clean_close?
  true
end

#status_codeObject

Status code for closing frame.



15
16
17
# File 'lib/libwebsocket/frame/error.rb', line 15

def status_code
  500 # This should not be called directly
end