B4J Question How to get connecting ip to websocket server?

tufanv

Expert
Licensed User
Longtime User
Hello,

Using jserver in my websocket server. Is it possible to get client's ip address when they are connected? I couldn't figure a way to get it.

Thanks
 

OliverA

Expert
Licensed User
Longtime User
Try:
B4X:
Private Sub WebSocket_Connected (WebSocket1 As WebSocket)
   Log(WebSocket1.UpgradeRequest.RemoteAddress)
End Sub
Note: UpgradeRequest returns a ServletRequest object
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…