RemObjects.InternetPack.Ftp.VirtualFtp.VirtualFtpServer.InvokeOnClientConnected C# (CSharp) Method

InvokeOnClientConnected() protected method

protected InvokeOnClientConnected ( SessionEventArgs e ) : void
e RemObjects.InternetPack.CommandBased.SessionEventArgs
return void
		protected override void InvokeOnClientConnected(SessionEventArgs e)
		{
			((VirtualFtpSession)e.Session).CurrentFolder = RootFolder;

			if (UserManager == null)
				return;

			if (!UserManager.CheckIP(e.Connection.RemoteEndPoint, e.Connection.LocalEndPoint))
			{
				e.Connection.Disconnect();
				throw new Exception("Access not allowed from this IP.");
			}

			base.InvokeOnClientConnected(e);
		}
		#endregion