コード例 #1
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);
            }
        }
コード例 #2
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);
        }
コード例 #3
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);
            }
        }
コード例 #4
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);
            }
        }
コード例 #5
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);
            }
        }
コード例 #6
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);
            }
        }
コード例 #7
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);
            }
        }
コード例 #8
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);
            }
        }