1
Client Version 1
// Set up a Client that will read information sent
// from a Server and display the information.
import java.io.*;
import java.net.*;
import java.awt.*;
public class Client extends Frame {
TextArea display;
public Client()
{
super( "Client" );
display = new TextArea( 20, 10 );
add( "Center", display );
resize( 300, 150 );
show();
}
public void runClient()
{
Socket client;
OutputStream output;
InputStream input;
try {
client = new Socket( “172.17.52.149”, 5000 );
Do'stlaringiz bilan baham: