public UDPServer(Lobby lobbyPtr, boolean broadcastServer) {
        this.lobbyPtr = lobbyPtr;
        try {
            if(broadcastServer)
                socket = new DatagramSocket(udpServerPortNb);
            else
                socket = new DatagramSocket();
        } catch(Exception e) {
            System.out.println(e.getMessage());
        }
        
            
    }