Class: Riddl::WebSocketImplementation
- Inherits:
-
Object
- Object
- Riddl::WebSocketImplementation
show all
- Defined in:
- lib/ruby/riddl/implementation.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of WebSocketImplementation.
29
30
31
32
33
34
35
36
|
# File 'lib/ruby/riddl/implementation.rb', line 29
def initialize(ws)
@ws = ws
@r = ws[:r] @s = ws[:s] @match = ws[:match] @env = ws[:env] @a = ws[:a] end
|
Instance Method Details
#close ⇒ Object
57
58
59
|
# File 'lib/ruby/riddl/implementation.rb', line 57
def close
p @ws[:io].class
end
|
#closed? ⇒ Boolean
53
54
55
|
# File 'lib/ruby/riddl/implementation.rb', line 53
def closed?
@ws[:io].closed?
end
|
#io ⇒ Object
50
51
52
|
# File 'lib/ruby/riddl/implementation.rb', line 50
def io
@ws[:io]
end
|
#io=(connection) ⇒ Object
47
48
49
|
# File 'lib/ruby/riddl/implementation.rb', line 47
def io=(connection)
@ws[:io] = connection
end
|
#onclose ⇒ Object
39
|
# File 'lib/ruby/riddl/implementation.rb', line 39
def onclose;end
|
#onerror(err) ⇒ Object
41
|
# File 'lib/ruby/riddl/implementation.rb', line 41
def onerror(err);end
|
#onmessage ⇒ Object
40
|
# File 'lib/ruby/riddl/implementation.rb', line 40
def onmessage;end
|
#onopen ⇒ Object
38
|
# File 'lib/ruby/riddl/implementation.rb', line 38
def onopen;end
|
#send(data) ⇒ Object
43
44
45
|
# File 'lib/ruby/riddl/implementation.rb', line 43
def send(data)
self.io.send data
end
|