Class: WebSocketConnection

Inherits:
Async::WebSocket::Connection
  • Object
show all
Defined in:
lib/sleeproom/async/websocket.rb

Instance Method Summary collapse

Instance Method Details

#dump(object) ⇒ Object



17
18
19
# File 'lib/sleeproom/async/websocket.rb', line 17

def dump(object)
  return object
end

#parse(buffer) ⇒ Object



13
14
15
# File 'lib/sleeproom/async/websocket.rb', line 13

def parse(buffer)
  return buffer
end

#readObject



3
4
5
6
7
# File 'lib/sleeproom/async/websocket.rb', line 3

def read
  if buffer = super
    parse(buffer)
  end
end

#write(object) ⇒ Object



9
10
11
# File 'lib/sleeproom/async/websocket.rb', line 9

def write(object)
  super(dump(object))
end