|
-
Java socket
I am trying to open a socket and send a
query to a remote comp. It connects allright, but does not
respond to the query, not even with an error message - that's
the problem.
just fyi - the ultimate goal of this program is to find mashines
within given IP range and read their parameters (hostname, mac
address, etc.)
Thanks a bunch! 
alex
try {
input = new BufferedReader(new
InputStreamReader(System.in));
OutputStream out = socket.getOutputStream();
out.write (45);
System.out.println ("start reading");
BufferedReader din =
new BufferedReader(new InputStreamReader
(socket.getInputStream()));
System.out.println ("done creating object");
response = din.readLine();
System.out.println ("done reading");
System.out.print (response);
socket.close();
//}
}
catch (IOException e) {
System.out.println(e);
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks