Module: Viaduct::WebPush::WebSocket
- Defined in:
- lib/viaduct/web_push/web_socket.rb,
lib/viaduct/web_push/web_socket/channel.rb,
lib/viaduct/web_push/web_socket/connection.rb,
lib/viaduct/web_push/web_socket/raw_socket.rb
Defined Under Namespace
Classes: Channel, Connection, HandshakeError, RawSocket
Class Attribute Summary collapse
-
.endpoint ⇒ Object
Return the endpoint for the websocket server.
- .logger ⇒ Object
Class Method Summary collapse
-
.connection(options = {}) ⇒ Object
Initialize a websocket connection for sending and receiving messages.
Class Attribute Details
.endpoint ⇒ Object
Return the endpoint for the websocket server
28 29 30 |
# File 'lib/viaduct/web_push/web_socket.rb', line 28 def endpoint @endpoint ||= "wss://#{Viaduct::WebPush.webpush_host}/vwp/socket/#{Viaduct::WebPush.token}" end |
.logger ⇒ Object
33 34 35 |
# File 'lib/viaduct/web_push/web_socket.rb', line 33 def logger @logger ||= Logger.new(STDOUT) end |
Class Method Details
.connection(options = {}) ⇒ Object
Initialize a websocket connection for sending and receiving messages
21 22 23 |
# File 'lib/viaduct/web_push/web_socket.rb', line 21 def connection(={}) @connection ||= Connection.new() end |