Exemplo n.º 1
0
        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);
        }
Exemplo n.º 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);
        }