@Override
    /**Observer Interface method. It executes when a message is received.*/
    public void update(Observable obs, Object obj) {
        NetworkMessage message = (NetworkMessage)obj;
        //If we are greeted, we say hi back.
        if(message.getType() == NetworkMessage.TYPE_HELLO){
            sender.send(new NetworkMessage(NetworkMessage.TYPE_HELLO_RES,"",Network.getPort()+""), message.sender,message.port);
        }
    }