There are several developers who use this framework: Custom WebSocket Based Push Framework with several hundreds of connected clients.
The link above is a possible alternative to GCM. It is not possible to implement a similar "background" solution on iOS.
Sub Timer1_Tick
ws.RunFunction("ServerPing", Array As Object(DateTime.Time(DateTime.Now),"Broadcast"))
ws.Flush
End Sub
Sub Device_Message( Params As Map)
Dim id As String = Params.Get("id")
Dim method As String =Params.Get("method")
ws.RunFunction("ServerPing", Array As Object(DateTime.Time(DateTime.Now),id & TAB & "Request received") )
ws.Flush
End Sub
conclusions :
when i used function (ws.RunFunction) in sub Timer1_Tick -> it will broadcasst to all connected users
when i used function ( ws.RunFunction) in event that raised by users, it's only sent to that client
true ???
then, how to know the number of users that connected in websocket's server (b4j) ??