public class MyClient {
public static void main(String[] args ) throws UnknownHostException, IOException{
Socket s=new Socket("172.28.138.185",30000);
new ClientIn(s).start();
new ClientOut(s).start();
}
}
class ClientIn extends Thread{
Socket s;
BufferedReader br;
public ClientIn(Socket s) throws IOException{
this.s=s;
br=new BufferedReader(new InputStreamReader(s.getInputStream()));
public class MyServer {
public static ArrayList<Socket> list=new ArrayList();
public static void main(String[] args) throws IOException{
ServerSocket ss=new ServerSocket(30000);
while(true){
Socket s=ss.accept();
list.add(s);
new ServerOut(s).start();
new ServerIn(s).start();