FileDocCategorySizeDatePackage
Inet6Demo.javaAPI DocExample812Sat Feb 14 14:42:12 GMT 2004None

Inet6Demo

public class Inet6Demo extends Object

Fields Summary
public static final int
DAYTIME_PORT
A well-known port that often listens on IPV4 and IPV6
private static final String
HOST
The server host
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)


	       

		Inet6Address server = (Inet6Address) Inet6Address.getByName(HOST);
		System.out.println("Lookup: " + server);

		Socket clientSocket;
		// clientSocket = new Socket(server, DAYTIME_PORT);
		clientSocket = new Socket("fe80::203:93ff:fe07:3ef6", DAYTIME_PORT);
		System.out.println(clientSocket);

		BufferedReader is = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
		String dateString = is.readLine();
		System.out.println(dateString);
		is.close();
		clientSocket.close();