Package classes

Examples of classes.ServerUserList


public class Server {
  public static void main(String[] ar) throws IOException {
     //Connection adresses
     Adress _connAdress = new Adress(6000,"127.0.0.2");
     //Server interaction
     ServerUserList _sui = new ServerUserList();
    
     //Print connections params
     //System.out.println("Server: connection's params ");
     //_connAdress.printInfo();
    
     ServerSocket _servSocket = new ServerSocket(_connAdress.getPort());
     System.out.println("Server: server started");
     try {
       while (true) {
         Socket _socket = _servSocket.accept();
             try {
               _sui.add(new Client(_socket,_sui));
             }
             catch (IOException e) {
               _socket.close();
             }
       }
View Full Code Here

TOP

Related Classes of classes.ServerUserList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.