Module: Patch::IO::Websocket

Extended by:
Websocket
Included in:
Websocket
Defined in:
lib/patch/io/websocket.rb,
lib/patch/io/websocket/node.rb,
lib/patch/io/websocket/socket.rb

Overview

Websocket IO

Defined Under Namespace

Classes: Node, Socket

Constant Summary collapse

KEY =

Key that will be used by Patch to identify the module

:websocket

Instance Method Summary collapse

Instance Method Details

#new_from_config(config, options = {}) ⇒ Object

Construct a websocket from a node config

Parameters:

  • config (Hash)
  • options (Hash) (defaults to: {})
  • (Hash)
  • properties (Hash)

    a customizable set of options



21
22
23
# File 'lib/patch/io/websocket.rb', line 21

def new_from_config(config, options = {})
  ::Patch::IO::Websocket::Node.new(config[:id], config[:host], config[:port], options)
end