Reply To: EZSrve XML Port? 2017-12-22T00:56:42+00:00

HOME Forums Gateways EZSrve EZSrve XML Port? Reply To: EZSrve XML Port?

Anonymous
Post count: 408

Here is another try. If this doesn’t work, send me an email, hopefully with an IP address and if you can open port 8002 for a time. I have tried this code below on several security setups, and it should work fine.


try {
Socket EZSrveSocket = new Socket("192.168.0.107", 8002);

PrintStream out = new PrintStream(EZSrveSocket.getOutputStream());
DataInputStream in = new DataInputStream( EZSrveSocket.getInputStream());

out.print("GetRevision");

long endTime = System.currentTimeMillis()+5000;

System.out.println("Received:");
while (System.currentTimeMillis()<endTime) {
System.out.println(in.readLine()); // Read one line and output it
}
in.close();
}
catch(Exception e) {
System.out.println("Failure:" + e);
}