Android Question WebSocket Client Library: Receiving data problem

teddybear

Well-Known Member
Licensed User
Hi
Regarding the WebSocket Client Library https://www.b4x.com/android/forum/threads/websocket-client-library.40221/
Its B4A example works for me to send data to a server. But I could not find a way to receive data from the server. How is it possible?
The example has clearly told you how to receive data from the server
Server side
B4X:
Sub Timer1_Tick
'This method will raise the event on the device
   ws.RunFunction("ServerTime", Array As Object(DateTime.Time(DateTime.Now)))
   ws.Flush
End Sub
Client side
B4X:
Sub wsh_ServerTime(Params As List)
   'example of a server push message
   lblServerTime.Text = "Server Time: " & Params.Get(0)
End Sub
 
Upvote 0
Top