home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Gadgets 1
/
ADE-1.bin
/
ade-dist
/
kaffe-0.5p4-src.tgz
/
tar.out
/
contrib
/
kaffe
/
test
/
network
/
socktest.java
< prev
next >
Wrap
Text File
|
1996-09-28
|
736b
|
21 lines
import java.lang.*;
import java.net.*;
import java.io.*;
class socktest {
public static void main(String argv[]) {
try {
ServerSocket ss = new ServerSocket(9999);
Socket s = new Socket("hamlet", 23);
InetAddress a1 = InetAddress.getByName("hamlet");
InetAddress a2 = InetAddress.getLocalHost();
System.out.println(ss);
System.out.println(s);
System.out.println(a1);
System.out.println(a2);
} catch (IOException e) {
System.out.println("error: "+e);
}
}
}