Esempio n. 1
0
        public ServerViewer(Render.IRenderView renderView, Audio.IAudioInterface audioInterface, Viewer previousViewer, Gui gui)
            : base(renderView, previousViewer, gui, Type.Server)
        {
            // Note: It is ok if the only clients are spectators, but running a server without any connected client makes no sense.
            // Note: All clients must be setup at game start. Clients can not join during the game.
            // Note: There may be more than 3 clients because of spectators!
            server = Network.Network.DefaultServerFactory.CreateLocal(previousViewer.MainInterface.ServerGameName, previousViewer.MainInterface.ServerGameInfo);

            Init();
            MainInterface = new ServerInterface(renderView, audioInterface, this, server);
        }
Esempio n. 2
0
        public ServerViewer(Render.IRenderView renderView, Audio.IAudioInterface audioInterface, Viewer previousViewer, Gui gui)
            : base(renderView, previousViewer, gui, Type.Server)
        {
            Log.Verbose.Write(ErrorSystemType.Application, "Creating server viewer.");

            // Note: It is ok if the only clients are spectators, but running a server without any connected client makes no sense.
            // Note: All clients must be setup at game start. Clients can not join during the game.
            // Note: There may be more than 3 clients because of spectators!
            server = previousViewer.MainInterface.Server;
            server.NetworkDataReceiver = previousViewer.MainInterface.NetworkDataHandler.NetworkDataReceiver;

            Init();
            MainInterface = new ServerInterface(renderView, audioInterface, this, previousViewer.MainInterface);
        }
Esempio n. 3
0
 public ServerInterface(IRenderView renderView, Audio.IAudioInterface audioInterface, Viewer viewer, Network.ILocalServer server)
     : base(renderView, audioInterface, viewer)
 {
     this.server = server;
 }