internal DCCBase(ServerConnection creatorsServerConnection, long RemoteHost, int Port, string Nickname, DCCContainerBase parent) : base(creatorsServerConnection) { container = parent; intID = Port; IPAddress ip = GetIP(RemoteHost); RemoteEndPoint = new IPEndPoint(ip, Port); strNickname = Nickname; }
internal DCCBase(ServerConnection creatorsServerConnection, string Nickname, int Port, DCCContainerBase parent) : base(creatorsServerConnection) { strNickname = Nickname; intID = Port; container = parent; listenSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); timer = new Timer(60000); timer.Elapsed += new ElapsedEventHandler(TimerProc); timer.AutoReset = true; timer.Enabled = true; listenSocket.Bind(new IPEndPoint(IPAddress.Any, Port)); listenSocket.Listen(100); listenSocket.BeginAccept(new AsyncCallback(acceptCallback), null); }