Class: VRTQL::WS::Connection

Inherits:
Object
  • Object
show all
Defined in:
doc/vrtql.rb

Instance Method Summary collapse

Constructor Details

#initializeVRTQL::Websocket::Connection

Initializes the Connection object



170
171
172
# File 'doc/vrtql.rb', line 170

def initialize
  # Implementation here...
end

Instance Method Details

#closenil

Closes the connection

Returns:

  • (nil)


192
193
194
# File 'doc/vrtql.rb', line 192

def close
  # Implementation here...
end

#connect(url) ⇒ Boolean

Connects to a specified host URL

Parameters:

  • url (String)

    The URL of the host to connect to

Returns:

  • (Boolean)

    True if connection was successful, false otherwise



178
179
180
# File 'doc/vrtql.rb', line 178

def connect(url)
  # Implementation here...
end

#connected?Boolean

Checks if the connection is established

Returns:

  • (Boolean)

    True if the connection is established, false otherwise



185
186
187
# File 'doc/vrtql.rb', line 185

def connected?
  # Implementation here...
end

#recv_frameVRTQL::Websocket::Frame?

Receives a WebSocket frame from the connection

frame was received

Returns:

  • (VRTQL::Websocket::Frame, nil)

    A WebSocket frame, or nil if no



216
217
218
# File 'doc/vrtql.rb', line 216

def recv_frame
  # Implementation here...
end

#recv_messageVRTQL::Websocket::Message?

Receives a message from the connection

message was received

Returns:

  • (VRTQL::Websocket::Message, nil)

    A WebSocket message, or nil if no



224
225
226
# File 'doc/vrtql.rb', line 224

def recv_message
  # Implementation here...
end

#send_binary(value) ⇒ Integer

Sends a binary message via the WebSocket connection

Parameters:

  • value (String)

    The binary message to send

Returns:

  • (Integer)

    The number of bytes sent



208
209
210
# File 'doc/vrtql.rb', line 208

def send_binary(value)
  # Implementation here...
end

#send_text(text) ⇒ Integer

Sends a text message via the WebSocket connection

Parameters:

  • text (String)

    The text message to send

Returns:

  • (Integer)

    The number of bytes sent



200
201
202
# File 'doc/vrtql.rb', line 200

def send_text(text)
  # Implementation here...
end

#set_timeout(timeout) ⇒ nil

Sets the timeout for the WebSocket connection

Parameters:

  • timeout (Numeric)

    The timeout value

Returns:

  • (nil)


232
233
234
# File 'doc/vrtql.rb', line 232

def set_timeout(timeout)
  # Implementation here...
end