J
jeffotn
I am familar with Java Sockets programming but not so much when it
comes to integrating with VB applications. My issues revolves around
apparent program hanging (i get no error message) when trying to
receive a reply from the program. If i got an exception that would be
something i can trouble shoot, but I really get nothing. I analyze
working VB that uses Winsock to communicate with the service
Java Code Fragment:
Socket s = new Socket("10.16.1.146", 5691); //fake port and ip dont
worry
InputStream is;
OutputStream os;
try {
is = s.getInputStream();
os = s.getOutputStream();
//Roedy Green litte-endian big-endian code
LEDataOutputStream los = new LEDataOutputStream(os);
los.writeBytes("00000003079010020060719"); //data request should
return some message
los.flush();
LEDataInputStream lis = new LEDataInputStream(is);
byte buffer = lis.readByte() //seem to hang
}catch (Exception) {
//print exception
}
End code framgement
One concern is if the the Services running on that port requires a
userid and password but I would expect a Connection Refuse Exception.
Hopefully the community can point me in the right direction thanks.
Jeff
comes to integrating with VB applications. My issues revolves around
apparent program hanging (i get no error message) when trying to
receive a reply from the program. If i got an exception that would be
something i can trouble shoot, but I really get nothing. I analyze
working VB that uses Winsock to communicate with the service
Java Code Fragment:
Socket s = new Socket("10.16.1.146", 5691); //fake port and ip dont
worry
InputStream is;
OutputStream os;
try {
is = s.getInputStream();
os = s.getOutputStream();
//Roedy Green litte-endian big-endian code
LEDataOutputStream los = new LEDataOutputStream(os);
los.writeBytes("00000003079010020060719"); //data request should
return some message
los.flush();
LEDataInputStream lis = new LEDataInputStream(is);
byte buffer = lis.readByte() //seem to hang
}catch (Exception) {
//print exception
}
End code framgement
One concern is if the the Services running on that port requires a
userid and password but I would expect a Connection Refuse Exception.
Hopefully the community can point me in the right direction thanks.
Jeff