| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 00c2eb7 commit c348334
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -77,6 +77,7 @@ public Client(PApplet parent, String host, int port) { | |||
| 77 | 77 | socket = new Socket(this.host, this.port); | |
| 78 | 78 | input = socket.getInputStream(); | |
| 79 | 79 | output = socket.getOutputStream(); | |
| 80 | + ip = socket.getInetAddress().getHostAddress(); | ||
| 80 | 81 | ||
| 81 | 82 | thread = new Thread(this); | |
| 82 | 83 | thread.start(); | |
@@ -123,6 +124,7 @@ public Client(PApplet parent, Socket socket) throws IOException { | |||
| 123 | 124 | ||
| 124 | 125 | input = socket.getInputStream(); | |
| 125 | 126 | output = socket.getOutputStream(); | |
| 127 | + ip = socket.getInetAddress().getHostAddress(); | ||
| 126 | 128 | ||
| 127 | 129 | thread = new Thread(this); | |
| 128 | 130 | thread.start(); | |
@@ -274,7 +276,7 @@ public boolean active() { | |||
| 274 | 276 | * @brief Returns the IP address of the machine as a String | |
| 275 | 277 | */ | |
| 276 | 278 | public String ip() { | |
| 277 | - return socket.getInetAddress().getHostAddress(); | ||
| 279 | + return ip; | ||
| 278 | 280 | } | |
| 279 | 281 | ||
| 280 | 282 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments