예제 #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);
        }
예제 #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);
        }
예제 #3
0
 public NetServer(IPAddress ip, int port, string serverPassword, List <TemplateCommand> customCommand) : this(ip, port, serverPassword)
 {
     commandController = new CommandController();// customCommand);
 }