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

LucaMs

Expert
Licensed User
Longtime User
How can I get it?

upload_2015-11-8_9-8-9.png


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
Top