コード例 #1
0
        private void handler_Closed(FtpSocketHandler handler)
        {
            m_apConnections.Remove(handler);

            if (ConnectionClosed != null)
            {
                ConnectionClosed(handler.Id);
            }
        }
コード例 #2
0
        private void Handler_Closed(FtpSocketHandler handler)
        {
            m_apConnections.Remove(handler);

            numberOfConnections = m_apConnections.Count;

            Trace.WriteLine($"Remover a handler, current connection number is {numberOfConnections}", "Information");

            ConnectionClosed?.Invoke(handler.Id);
        }
コード例 #3
0
ファイル: FtpServer.cs プロジェクト: reebonz/FTP2Azure
        private void handler_Closed(FtpSocketHandler handler)
        {
            m_apConnections.Remove(handler);

            Trace.WriteLine(
                string.Format("Remover a handler, current connection number is {0}", m_apConnections.Count),
                "Information");

            if (ConnectionClosed != null)
            {
                ConnectionClosed(handler.Id);
            }
        }
コード例 #4
0
ファイル: FtpServer.cs プロジェクト: jordiruiz/azftp2blob
        private void handler_Closed(FtpSocketHandler handler)
        {
            m_apConnections.Remove(handler);

            Trace.WriteLine(
                string.Format("Handler closed {0}. Current Count {1}", handler.Socket.Client.RemoteEndPoint.ToString(), m_apConnections.Count),
                "Information");

            if (ConnectionClosed != null)
            {
                ConnectionClosed(handler.Id);
            }
        }
コード例 #5
0
        private void InitialiseSocketHandler(TcpClient socket)
        {
            var handler = new FtpSocketHandler(m_fileSystemClassFactory, m_nId);

            handler.Start(socket);

            m_apConnections.Add(handler);

            handler.Closed += handler_Closed;

            if (NewConnection != null)
            {
                NewConnection(m_nId);
            }
        }
コード例 #6
0
        private void handler_Closed(FtpSocketHandler handler)
        {
            lock (m_apConnections)
            {
                m_apConnections.Remove(handler);

                LogWrite(
                    $"Client closed: {handler.RemoteEndPoint} current count={m_apConnections.Count}");
                Trace.WriteLine(
                    $"Handler closed {handler.RemoteEndPoint}. Current Count {m_apConnections.Count}",
                    "Information");

                ConnectionClosed?.Invoke(handler.Id);
            }
        }
コード例 #7
0
        private void InitialiseSocketHandler(TcpClient socket)
        {
            var handler = new FtpSocketHandler(m_fileSystemClassFactory, m_nId);

            handler.UserLoginEvent  += UserLoginEvent;
            handler.UserLogoutEvent += UserLogoutEvent;
            // get encoding for the socket connection
            handler.Start(socket, m_encoding);

            m_apConnections.Add(handler);

            numberOfConnections = m_apConnections.Count;

            Trace.WriteLine($"Add a new handler, current connection number is {numberOfConnections}", "Information");

            handler.Closed += Handler_Closed;

            NewConnection?.Invoke(m_nId);
        }
コード例 #8
0
ファイル: FtpServer.cs プロジェクト: reebonz/FTP2Azure
        private void InitialiseSocketHandler(TcpClient socket)
        {
            var handler = new FtpSocketHandler(m_fileSystemClassFactory, m_nId);

            // get encoding for the socket connection

            handler.Start(socket, m_encoding);

            m_apConnections.Add(handler);

            Trace.WriteLine(
                string.Format("Add a new handler, current connection number is {0}", m_apConnections.Count),
                "Information");

            handler.Closed += handler_Closed;

            if (NewConnection != null)
            {
                NewConnection(m_nId);
            }
        }
コード例 #9
0
ファイル: FtpServer.cs プロジェクト: jordiruiz/azftp2blob
        private void InitialiseSocketHandler(TcpClient socket)
        {
            var handler = new FtpSocketHandler(m_fileSystemClassFactory, m_nId);

            // get encoding for the socket connection

            handler.Start(socket, m_encoding);

            m_apConnections.Add(handler);

            Trace.WriteLine(
                string.Format("Handler created for client {0}. Current Count {1}", socket.Client.RemoteEndPoint.ToString(), m_apConnections.Count),
                "Information");

            handler.Closed += handler_Closed;

            if (NewConnection != null)
            {
                NewConnection(m_nId);
            }
        }
コード例 #10
0
        private void InitialiseSocketHandler(TcpClient socket)
        {
            lock (m_apConnections)
            {
                var handler = new FtpSocketHandler(m_fileSystemClassFactory, m_nId);
                handler.Closed += handler_Closed;

                // get encoding for the socket connection

                handler.Start(socket, m_encoding);

                m_apConnections.Add(handler);

                FtpServer.LogWrite(
                    $"Client accepted: {socket.Client.RemoteEndPoint} current count={m_apConnections.Count}");
                Trace.WriteLine(
                    $"Handler created for client {handler.RemoteEndPoint}. Current Count {m_apConnections.Count}",
                    "Information");

                NewConnection?.Invoke(m_nId);
            }
        }
コード例 #11
0
ファイル: FtpServer.cs プロジェクト: reebonz/FTP2Azure
        private void InitialiseSocketHandler(TcpClient socket)
        {
            var handler = new FtpSocketHandler(m_fileSystemClassFactory, m_nId);

            // get encoding for the socket connection

            handler.Start(socket, m_encoding);

            m_apConnections.Add(handler);

            Trace.WriteLine(
                string.Format("Add a new handler, current connection number is {0}", m_apConnections.Count),
                "Information");

            handler.Closed += handler_Closed;

            if (NewConnection != null)
            {
                NewConnection(m_nId);
            }
        }
コード例 #12
0
ファイル: FtpServer.cs プロジェクト: reebonz/FTP2Azure
        private void handler_Closed(FtpSocketHandler handler)
        {
            m_apConnections.Remove(handler);

            Trace.WriteLine(
                string.Format("Remover a handler, current connection number is {0}", m_apConnections.Count),
                "Information");

            if (ConnectionClosed != null)
            {
                ConnectionClosed(handler.Id);
            }
        }
コード例 #13
0
ファイル: FtpServer.cs プロジェクト: chineking/AzureFTP
        private void handler_Closed(FtpSocketHandler handler)
        {
            m_apConnections.Remove(handler);

            if (ConnectionClosed != null)
            {
                ConnectionClosed(handler.Id);
            }
        }
コード例 #14
0
ファイル: FtpServer.cs プロジェクト: chineking/AzureFTP
        private void InitialiseSocketHandler(TcpClient socket)
        {
            var handler = new FtpSocketHandler(m_fileSystemClassFactory, m_nId);
            handler.Start(socket);

            m_apConnections.Add(handler);

            handler.Closed += handler_Closed;

            if (NewConnection != null)
            {
                NewConnection(m_nId);
            }
        }
コード例 #15
0
ファイル: FtpServer.cs プロジェクト: Cache22/wedge
        private void InitialiseSocketHandler(TcpClient socket)
        {
            var handler = new FtpSocketHandler(
                fileSystemClassFactory: m_fileSystemClassFactory, 
                nId: m_nId, 
                localPasvEndpoint: this.m_localPasvEndpoint, 
                externallyVisiblePasvEndpoint: this.m_externallyVisiblePasvEndpoint,
                maxIdleTime: this.m_maxIdleTime);
            
            // get encoding for the socket connection
            
            handler.Start(socket, m_encoding);

            m_apConnections.Add(handler);

            Trace.WriteLine(
                string.Format("Add a new handler, current connection number is {0}", m_apConnections.Count),
                "Information");

            handler.Closed += handler_Closed;

            if (NewConnection != null)
            {
                NewConnection(m_nId);
            }
        }