¨ç ¼Ò½ºÄÚµå
¨± ¼¹ö
import java.net.*;
import java.io.*;
public class Server
{
private DataInputStream reader;
private DataOutputStream writer;
private ServerSocket server;
private Socket socket;
public Server()
{
}
void startServer()
{
try
{
server = new ServerSocket(7777);
while(true)
{
System.out.println(`wait for connection...`);
socket = server.accept();
System.out.println(`connection established...`);
reader = new DataInputStream(socket.getInputStream());
writer = new DataOutputStream(socket.getOutputStream());
getCommand();
}
}
catch(Exception e)
{
System.out.println(e);
}
}
void getCommand()
{
try
{
while(true)
{
String fi¡¦(»ý·«)
|