koush / AndroidAsync

Asynchronous socket, http(s) (client+server) and websocket library for android. Based on nio, not threads.
Other
7.52k stars 1.56k forks source link

I created a web socket server with this library in my project, and this lib is pretty good. But why not provides a method which we can get the socket client's IP and port? #644

Open EvanWang1987 opened 5 years ago

EvanWang1987 commented 5 years ago

I created a web socket server with this library in my project, and this lib is pretty good. But why not provides a method which we can get the socket client's IP and port?

dotfeng commented 5 years ago

String address = ((AsyncNetworkSocket)webSocket.getSocket()).getRemoteAddress().getAddress().getHostAddress();