Hello,
I´m trying to use the Websocket library to exchange data with a couple of different servers (not the provided server in B4J).
For instance, the server at wss://demos.kaazing.com/echo.
It echoes (sends back) the strings that are sent to it, for testing purposes.
I am able to connect to it, send data, but I don´t know where to receive the data in the Websocket library. The example shows how to receive events from the B4J server only.
Sub Process_Globals
Private link As String = "wss://demos.kaazing.com/echo"
End Sub
Sub Globals
Public ws As WebSocket
Dim Button1 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
ws.Initialize("ws")
End If
Activity.LoadLayout("1")
ws.Connect(link)
End Sub
Private Sub ws_Connected
Msgbox("Connected","MSG")
End Sub
Sub Button1_Click
ws.SendText("Hello World")
End Sub
------------------------------------
Is there a Sub where the incoming that is provided? Using B4A 3.00.
Regards,
Thiago
I´m trying to use the Websocket library to exchange data with a couple of different servers (not the provided server in B4J).
For instance, the server at wss://demos.kaazing.com/echo.
It echoes (sends back) the strings that are sent to it, for testing purposes.
I am able to connect to it, send data, but I don´t know where to receive the data in the Websocket library. The example shows how to receive events from the B4J server only.
Sub Process_Globals
Private link As String = "wss://demos.kaazing.com/echo"
End Sub
Sub Globals
Public ws As WebSocket
Dim Button1 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
ws.Initialize("ws")
End If
Activity.LoadLayout("1")
ws.Connect(link)
End Sub
Private Sub ws_Connected
Msgbox("Connected","MSG")
End Sub
Sub Button1_Click
ws.SendText("Hello World")
End Sub
------------------------------------
Is there a Sub where the incoming that is provided? Using B4A 3.00.
Regards,
Thiago