What does Java InetSocketAddress look like .toString()?
问题 I'm doing a .toString() on an InetSocketAddress. This is part of an Android websocket client that so far is failing to connect to the host. Right now the output from a variable address.toString() looks like domain.com/72.xx.xxx.xx:8000 but from what I understand there needs to be two values (IP and port) only? Thanks letting me know if this looks correct. 回答1: The toString() of InetSocketAddress first calls the toString() of InetAddress and then appends the port number to it and the string