B4J Question Web server - How to get remote (client) IP

LucaMs

Expert
Licensed User
Longtime User
How can I get it?



B4X:
Private Sub WebSocket_Connected (WebSocket1 As WebSocket)
   Dim RemoteIP As String = WebSocket1.UpgradeRequest.RemoteAddress
End Sub


I needed this information, so I wrote this question instead of publishing it in the thread Snippets since it is a simple command.
In this way it is easily findable.

I also found that you can get it through ServletRequest but this (ServletRequest) is not described.
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…