Skip to main content

FtpListener Class

NuGet: GHIElectronics.TinyCLR.Networking.Ftp
Assembly: GHIElectronics.TinyCLR.Networking.Ftp
Namespace: GHIElectronics.TinyCLR.Networking

The base class for all Ftp listeners implemented all basic functionalities like context queue management, authentication events

public class FtpListener : IDisposable

Constructors​

FtpListener()​

public FtpListener() : this(true)

Creates an FTP listener registered with the listener manager.

Properties​

Prefixes​

public ArrayList Prefixes { get; }

List of prefixes that the listener is listening to

IsListening​

public bool IsListening { get; }

Flag indicates whether the listener is listening to contexts or not

Methods​

AutoResetEvent( false)​

protected AutoResetEvent m_ContextQueueLock = new AutoResetEvent(false)

Synchronization event signaled when a context is added to the queue.

Returns AutoResetEvent m_ContextQueueLock = new

Start()​

public virtual void Start()

Start the listener

Stop()​

public virtual void Stop()

Stop the listener

GetContext()​

public FtpListenerContext GetContext()

Get the oldest context from the context queue the method would be block until there is a pending context

Returns FtpListenerContext

Events​

AuthenticationEvent​

public static event UserAuthenticator AuthenticationEvent

Raised to authenticate a user logging in to the FTP server.

Fields​

m_ContextQueue​

protected Queue m_ContextQueue

Queue of pending contexts waiting to be served by this listener.

m_Prefixes​

protected ArrayList m_Prefixes

List of path prefixes this listener handles.