A Abbas818 Member Mar 7, 2025 #1 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?
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?
teddybear Well-Known Member Licensed User Mar 7, 2025 #2 Abbas818 said: 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? Click to expand... The example has clearly told you how to receive data from the server Server side B4X: Copy 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: Copy Sub wsh_ServerTime(Params As List) 'example of a server push message lblServerTime.Text = "Server Time: " & Params.Get(0) End Sub Upvote 0
Abbas818 said: 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? Click to expand... The example has clearly told you how to receive data from the server Server side B4X: Copy 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: Copy Sub wsh_ServerTime(Params As List) 'example of a server push message lblServerTime.Text = "Server Time: " & Params.Get(0) End Sub