Professional Documents
Culture Documents
PROGRAM:
import java.io.*;
import java.net.*;
try {
out.println("GET / HTTP/1.1\nHost:www.google.com");
String inputLine;
System.out.println(inputLine);
}
}
catch (UnknownHostException e) {
System.exit(1);
catch (IOException e) {
System.exit(1);
OUTPUT
RESULT
The program to download webpage using TCP socket has been executed.