@Override
    public void run() {
        try {
            while(true) {
                TimeStampMessage message = null;
                // Check whether the config file has benn changed
                String MD5 = ConfigParser.getMD5Checksum(configFile);
                if (!MD5.equals(MD5Last)) {
                    sendRules = ConfigParser.readSendRules();
                    recvRules = ConfigParser.readRecvRules();
                    MD5Last = MD5;
                }

                in = new ObjectInputStream(new BufferedInputStream(socket.getInputStream()));
                if((message = (TimeStampMessage) (in.readObject())) != null) {
                    // Message processing is different if it is a multicast one
                	if(message instanceof MulticastMessage) {
                	    processMulti((MulticastMessage) message);
                	}
                	else {
                	    checkRuleAndPut(message);
                	}
                }
            }
        }
        catch (EOFException e) {

        }
        catch (IOException e) {
            e.printStackTrace();
        }
        catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }