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();
have you tried the URL connections?
It will open a connection, then you'll have to request the rest once it's opened. it takes a full http://www.blah.com/
url argument at the command line
----------------------------------
import java.io.*;
import java.net.*;
public class Url {
public static void main(String args[]) {
boolean conn=true;
for (int i = 0; i <args.length; i++){
try{
URL u = new URL(args[i]);