Ejemplo n.º 1
0
        public GamePadServer(IUdpClient udpClient, IPlatform platform, String serverName, String serverPassword = "", int capacity = Defaults.DEFAULT_SERVER_CAPACITY, int listeningPort = Defaults.DEFAULT_SERVER_PORT) : base(udpClient, platform)
        {
            if (!ValidateServerName(serverName))
            {
                throw new BonaVirtualGamePadException("Server name contains disallowed characters");
            }

            ServerName     = serverName;
            ServerPassword = serverPassword;

            ListeningEndPoint = UdpClient.GetAnyEndPoint(listeningPort);
            UdpClient.SetEndPoint(ListeningEndPoint);

            Clients = new PlayerClient[capacity];
        }