B4J Question problem push Framework WebSoket

klingon467

Member
Licensed User
Longtime User
hi,
i have try this example: https://www.b4x.com/android/forum/threads/custom-websocket-based-push-framework.40272/
but i do not understand how to send parameters in the socket...
for example....
Code: Copy
Sub wsh_ServerReady(Params As List)
    Dim m As Map
    m.Initialize
    m.Put("id", id)
    m.Put("version", VERSION)
    wsh.SendEventToServer("Device_id", m)
End Sub
here put device_id to server but I find no reference to "Device_id" into server????
how to send this parameter?
the server as it receives?

thanks
 
This code is from the B4A app. It will raise an event on the server.
Hi @Erel
by your example WebSocketPush.b4j I do not understand as steps these values....

Code: Copy
Sub wsh_ServerReady(Params As List)
    Dim m As Map
    m.Initialize
    m.Put("id", id) 'put into map id value readead by id.txt
    m.Put("version", VERSION) 'put versione value
    wsh.SendEventToServer("Device_id", m) 'send to server as Device_id event
End Sub

now from server as read this value?

thanks
 
Upvote 0
Back
Top