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
/
DemoClient.java
next >
Wrap
Text File
|
1996-09-28
|
568b
|
29 lines
import java.net.*;
import java.io.*;
public class DemoClient extends Thread
{
public static void main(String[] args)
{
DemoClient app = new DemoClient();
app.start();
}
public void run()
{
Socket newSocket;
try {
newSocket = new Socket("localhost", 5758);
System.out.println("Client connected to server.");
DataOutputStream outStream = new DataOutputStream(
newSocket.getOutputStream());
outStream.writeInt(12345);
System.exit(0);
} catch (Exception oops) {
System.out.println("Error connecting to server");
return;
}
}
}