B4J Question concurrent users/clients that can be handle with b4j websocket ?

devpialkt

Member
Licensed User
Longtime User

Erel

B4X founder
Staff member
Licensed User
Longtime User
It depends on many parameters.

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.

  • is possible to send private message to specific user ?
Yes.
 
Upvote 0

devpialkt

Member
Licensed User
Longtime User

thanks for your quick response




i have modified the code as shown below :


B4X:
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) ??
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…