Beispiel #1
0
        public Gate()
        {
            frontendNetwork = new ServerNetwork(6888)
            {
                OnClientConnected       = OnFrontendConnected,
                OnClientMessageReceived = OnFrontendMessageReceived,
            };
            backendNetwork = new ServerNetwork(6999)
            {
                OnClientConnected       = OnBackendConnected,
                OnClientMessageReceived = OnBackendMessageReceived,
            };

            frontendNetwork.BeginAccept();
            backendNetwork.BeginAccept();
        }
Beispiel #2
0
        public Gate(int frontPort, int backPort)
        {
            frontendNetwork = new ServerNetwork(frontPort)
            {
                OnClientConnected       = OnFrontendConnected,
                OnClientDisconnected    = OnFrontendDisconnected,
                OnClientMessageReceived = OnFrontendMessageReceived,
            };
            backendNetwork = new ServerNetwork(backPort)
            {
                OnClientConnected       = OnBackendConnected,
                OnClientDisconnected    = OnBackendDisconnected,
                OnClientMessageReceived = OnBackendMessageReceived,
            };

            frontendNetwork.BeginAccept();
            backendNetwork.BeginAccept();
        }