Class: VRTQL::Connection
- Inherits:
-
Object
- Object
- VRTQL::Connection
- Defined in:
- doc/vrtql.rb
Overview
This class manages a WebSocket connection to a VRTQL server. It provides methods for sending and receiving VRTQL messages.
Instance Method Summary collapse
-
#format=(value) ⇒ Integer
Sets default serialize format.
-
#initialize ⇒ Connection
constructor
Initializes a new Connection object.
-
#receive ⇒ VRTQL::Message?
Receives a VRTQL message from the WebSocket connection.
-
#send(value, format = :mpack) ⇒ Integer
Sends a VRTQL message via the WebSocket connection.
Constructor Details
#initialize ⇒ Connection
Initializes a new Connection object.
9 10 11 |
# File 'doc/vrtql.rb', line 9 def initialize # Implementation is in the C-extension end |
Instance Method Details
#format=(value) ⇒ Integer
Sets default serialize format. Every message will be sent in this format unless specifically overridden using the ‘format` argument of the the Connection#send() method.
20 21 22 |
# File 'doc/vrtql.rb', line 20 def format=(value) # Implementation is in the C-extension end |
#receive ⇒ VRTQL::Message?
Receives a VRTQL message from the WebSocket connection.
received.
39 40 41 |
# File 'doc/vrtql.rb', line 39 def receive # Implementation is in the C-extension end |
#send(value, format = :mpack) ⇒ Integer
Sends a VRTQL message via the WebSocket connection.
31 32 33 |
# File 'doc/vrtql.rb', line 31 def send(value, format=:mpack) # Implementation is in the C-extension end |