Class: DatawireQuarkCore::WebsocketAdapter
- Inherits:
-
Object
- Object
- DatawireQuarkCore::WebsocketAdapter
- Defined in:
- lib/datawire-quark-core.rb
Instance Attribute Summary collapse
-
#opened ⇒ Object
Returns the value of attribute opened.
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(client) ⇒ WebsocketAdapter
constructor
A new instance of WebsocketAdapter.
- #send(message) ⇒ Object
- #sendBinary(message) ⇒ Object
Constructor Details
#initialize(client) ⇒ WebsocketAdapter
Returns a new instance of WebsocketAdapter.
679 680 681 682 |
# File 'lib/datawire-quark-core.rb', line 679 def initialize(client) @client = client @opened = false end |
Instance Attribute Details
#opened ⇒ Object
Returns the value of attribute opened.
678 679 680 |
# File 'lib/datawire-quark-core.rb', line 678 def opened @opened end |
Instance Method Details
#close ⇒ Object
692 693 694 |
# File 'lib/datawire-quark-core.rb', line 692 def close @client.close end |
#send(message) ⇒ Object
684 685 686 |
# File 'lib/datawire-quark-core.rb', line 684 def send () @client.text end |
#sendBinary(message) ⇒ Object
688 689 690 |
# File 'lib/datawire-quark-core.rb', line 688 def sendBinary () @client.binary .data end |