Skip to content
Snippets Groups Projects
Select Git revision
  • ebbc4d12c45e839711f53359de7b7c61a52a4c89
  • main default protected
2 results

Program.cs

Blame
  • user avatar
    tonschnoer authored
    ebbc4d12
    History
    Program.cs 673 B
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace TcpServerTest
    {
        class Program
        {
            static void Main(string[] args)
            {
    
                if (args.Length > 0)
                {
                    if (args[0] == "server")
                    {
                        TCPServer.StartServer();
                    }
    
                    if (args[0] == "client")
                    {
                        TCPClient.connect(args[1]);
                    }
                }
                else
                {
                    TCPServer.StartServer();
                    Console.ReadLine();
                }
    
    
    
            }
        }
    }