Skip to content

Commit 8f89e60

Browse files
committed
Add host IP and port to the popup
This should help debugging problems with connection setup to the remote PC.
1 parent 7832c42 commit 8f89e60

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/com/fzi/externalcontrol/impl/RequestProgram.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ public String sendCommand(String command) {
5656
// 5 second timeout (make configurable?)
5757
int timeout = 5*1000;
5858
socket.connect(new InetSocketAddress(this.hostIp, this.portNr), timeout);
59+
System.out.println("hostIp is: " + this.hostIp);
60+
System.out.println("portNr is: " + this.portNr);
61+
5962

6063
if (socket.isConnected()) {
6164
// output stream creation
@@ -80,7 +83,7 @@ public String sendCommand(String command) {
8083
}
8184
socket.close();
8285
} catch (IOException e) {
83-
result = String.format("popup(\"The connection to the remote PC could not be established. Reason: %s\","
86+
result = String.format("popup(\"The connection to the remote PC at " + this.hostIp + ":" + this.portNr + " could not be established. Reason: %s\","
8487
+ "\"Receive program failed\", False, True, blocking=True)\n"
8588
+ "sync()", e.getMessage());
8689
}

0 commit comments

Comments
 (0)