public NetServer(IPAddress ip, int port)
        {
            IP   = ip;
            Port = port;

            listner           = new TcpListener(IP, Port);
            Clients           = new Dictionary <string, ClientInfo>();
            sendner           = new Sendner();
            commandController = new CommandController();// null);
        }
Example #2
0
        public NetClient(string name, string password)//, List<TemplateCommand> customCommand)
        {
            var passwordHash = "";

            if (password != null && password != "")
            {
                passwordHash = password.GetHashCode().ToString();
            }
            else
            {
                passwordHash = "";
            }

            info              = new ClientInfo(name, passwordHash);
            sendner           = new Sendner();
            commandController = new CommandController();//customCommand);
        }
 public NetServer(IPAddress ip, int port, string serverPassword, List <TemplateCommand> customCommand) : this(ip, port, serverPassword)
 {
     commandController = new CommandController();// customCommand);
 }