コード例 #1
0
        static void Main(string[] args)
        {
            using (ProxyServer server = new ProxyServer())
            {
                server.OnClientLocalMessage  += OnLocalClientMessage;
                server.OnClientRemoteMessage += OnRemoteClientMessage;
                server.OnClientStateChanged  += OnClientStatusChange;
                server.OnTick += OnTick;

                server.Bind
                (
                    new IPEndPoint(IPAddress.Any, 9933),
                    new IPEndPoint(IPAddress.Parse("my.sfs.game.ip"), 9933)
                );

                Console.WriteLine("PRESS Q TO EXIT...");
                while (Console.ReadKey(true).Key != ConsoleKey.Q)
                {
                    continue;
                }
            }
        }