Method: Appium::Core::WebSocket#send

Defined in:
lib/appium_lib_core/common/ws/websocket.rb

#send(message) ⇒ Object

Accepts either a String or an Array of byte-sized integers and sends a text or binary message over the connection to the other peer; binary data must be encoded as an Array.

Examples:

ws = WebSocket.new(url: "ws://#{host}:#{port}/ws/session/#{@session_id}/appium/device/logcat")
ws.send 'happy testing'

Parameters:

  • message (String, Array)

    A message to send a text or binary message over the connection



93
94
95
# File 'lib/appium_lib_core/common/ws/websocket.rb', line 93

def send(message)
  @client.send message
end