Changeset 418ace2 in galcon-server


Ignore:
Timestamp:
Jun 24, 2010, 12:06:53 AM (14 years ago)
Author:
ZeroCool <devnull@…>
Branches:
master
Parents:
34ccb37
Message:

Some more stuff in server

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Connection.java

    r34ccb37 r418ace2  
    1717    private PrintWriter out;
    1818    private BufferedReader in;
    19     private String name;
     19    private final int ID;
    2020   
    2121   
    22     public Connection(String ip, int port, String threadName) {
     22    public Connection(String ip, int port, String threadName,int ID) {
    2323        super(threadName);
    2424       
     
    2828        this.ip = ip;
    2929        this.port = port;
     30        this.ID = ID;
    3031    }
    3132   
    32     public Connection(Socket socket, String threadName) {
     33    public Connection(Socket socket, String threadName, int ID) {
    3334        super(threadName);
    3435       
     
    3637        interrupted = false;
    3738        this.socket = socket;
     39        this.ID = ID;
    3840    }
    3941   
  • src/GameServer.java

    r34ccb37 r418ace2  
    1616       
    1717        public void addConnection(Socket clientSocket) {
    18                 Connection temp = new Connection(clientSocket,"noob");
     18                Connection temp = new Connection(clientSocket,"noob",1);
    1919                temp.start();
    2020                connections.add(temp);
Note: See TracChangeset for help on using the changeset viewer.