Android Programming Press on the image to return to the main documentation page.

WebSocket

List of types:

WebSocket

WebSocket

Implementation of a WebSocket client.

Permissions:

android.permission.INTERNET

Events:

Connected
Closed (Reason As String)
TextMessage (Message As String)

Members:


  Close

  Connect (Url As String)

  Connected As Boolean [read only]

  Initialize (EventName As String)

  SendText (Text As String)

  SetCustomSSLTrustManager (TrustManager As Object)

Members description:

Close
Closes the connection.
Connect (Url As String)
Tries to connect to the given Url. The Url should start with ws:// or wss://.
Connected As Boolean [read only]
Checks whether the connection is open.
Initialize (EventName As String)
Initializes the object and sets the subs that will handle the events.
SendText (Text As String)
Sends a text message.
SetCustomSSLTrustManager (TrustManager As Object)
Sets a custom SSL socket factory (custom factory is available in the Net library).
Top