Protocol::WebSocketSourceProtocolWebSocketProtocolError

class ProtocolError

Raised by stream or connection handlers, results in GOAWAY frame which signals termination of the current connection. You cannot recover from this exception, or any exceptions subclassed from it.

Definitions

def initialize(message, code = PROTOCOL_ERROR)

Initialize a protocol error with an optional status code.

Signature

parameter message String

The error message.

parameter code Integer

The WebSocket status code associated with the error.

Implementation

def initialize(message, code = PROTOCOL_ERROR)
	super(message)
	
	@code = code
end

attr :code

Signature

attribute Integer

The status code associated with the error.