Module: WebSocket
- Defined in:
- lib/websocket.rb,
lib/websocket/error.rb,
lib/websocket/frame.rb,
lib/websocket/version.rb,
lib/websocket/handshake.rb,
lib/websocket/frame/base.rb,
lib/websocket/frame/data.rb,
lib/websocket/nice_inspect.rb,
lib/websocket/frame/handler.rb,
lib/websocket/frame/incoming.rb,
lib/websocket/frame/outgoing.rb,
lib/websocket/handshake/base.rb,
lib/websocket/handshake/client.rb,
lib/websocket/handshake/server.rb,
lib/websocket/exception_handler.rb,
lib/websocket/handshake/handler.rb,
lib/websocket/frame/handler/base.rb,
lib/websocket/frame/incoming/client.rb,
lib/websocket/frame/incoming/server.rb,
lib/websocket/frame/outgoing/client.rb,
lib/websocket/frame/outgoing/server.rb,
lib/websocket/handshake/handler/base.rb,
lib/websocket/frame/handler/handler03.rb,
lib/websocket/frame/handler/handler04.rb,
lib/websocket/frame/handler/handler05.rb,
lib/websocket/frame/handler/handler07.rb,
lib/websocket/frame/handler/handler75.rb,
lib/websocket/handshake/handler/client.rb,
lib/websocket/handshake/handler/server.rb,
lib/websocket/handshake/handler/client01.rb,
lib/websocket/handshake/handler/client04.rb,
lib/websocket/handshake/handler/client11.rb,
lib/websocket/handshake/handler/client75.rb,
lib/websocket/handshake/handler/client76.rb,
lib/websocket/handshake/handler/server04.rb,
lib/websocket/handshake/handler/server75.rb,
lib/websocket/handshake/handler/server76.rb
Overview
WebSocket protocol implementation in Ruby This module does not provide a WebSocket server or client, but is made for using in http servers or clients to provide WebSocket support.
Defined Under Namespace
Modules: ExceptionHandler, Frame, Handshake, NiceInspect Classes: Error
Constant Summary collapse
- DEFAULT_VERSION =
Default WebSocket version to use
13
- ROOT =
__dir__
- VERSION =
'1.2.10'.freeze
Class Method Summary collapse
-
.max_frame_size ⇒ Object
Limit of frame size payload in bytes.
-
.max_frame_size=(val) ⇒ Object
Set limit of frame size payload in bytes.
-
.should_raise ⇒ Object
If set to true error will be raised instead of setting ‘error` method.
-
.should_raise=(val) ⇒ Object
Should protocol errors raise ruby errors? If false then ‘error` flag is set instead.
Class Method Details
.max_frame_size ⇒ Object
Limit of frame size payload in bytes
20 21 22 |
# File 'lib/websocket.rb', line 20 def self.max_frame_size @max_frame_size ||= 20 * 1024 * 1024 # 20MB end |
.max_frame_size=(val) ⇒ Object
Set limit of frame size payload in bytes
25 26 27 |
# File 'lib/websocket.rb', line 25 def self.max_frame_size=(val) @max_frame_size = val end |
.should_raise ⇒ Object
If set to true error will be raised instead of setting ‘error` method. All errors inherit from WebSocket::Error.
31 32 33 |
# File 'lib/websocket.rb', line 31 def self.should_raise @should_raise ||= false end |
.should_raise=(val) ⇒ Object
Should protocol errors raise ruby errors? If false then ‘error` flag is set instead.
36 37 38 |
# File 'lib/websocket.rb', line 36 def self.should_raise=(val) @should_raise = val end |