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....
B4X:
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
 

klingon467

Member
Licensed User
Longtime User
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....

B4X:
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
Top