Difference between revisions of "TFtpServer"

From Overbyte
Jump to navigation Jump to search
 
(4 intermediate revisions by 3 users not shown)
Line 2: Line 2:
 
== Overview ==
 
== Overview ==
  
*'''unit''' FtpSrv.pas
+
*'''unit''' [[OverbyteIcsFtpSrv.pas]]
*'''inheritance''' TFtpServer - TComponent
+
*'''inheritance''' TIcsWndControl -> TFtpServer
  
 
TFtpServer component is implementing the server side FTP protocol described in RFC [http://rfc.net/rfc959.html 959]. FTP protocol is the standard protocol for transfering files.
 
TFtpServer component is implementing the server side FTP protocol described in RFC [http://rfc.net/rfc959.html 959]. FTP protocol is the standard protocol for transfering files.
Line 18: Line 18:
 
| valign="top" | [[TFtpServer.UserData | UserData]] |||| Data passed to each client instance.
 
| valign="top" | [[TFtpServer.UserData | UserData]] |||| Data passed to each client instance.
 
|-
 
|-
| valign="top" | [[TFtpServer.MaxClient | MaxClient]] |||| Maximum number of simultaneous client to be accepted.
+
| valign="top" | [[TFtpServer.MaxClients | MaxClients]] |||| Maximum number of simultaneous clients to be accepted.
 
|-
 
|-
 
| valign="top" | [[TFtpServer.PasvIpAddr | PasvIpAddr]] |||| IP address used for passive mode.
 
| valign="top" | [[TFtpServer.PasvIpAddr | PasvIpAddr]] |||| IP address used for passive mode.
Line 28: Line 28:
 
| valign="top" | [[TFtpServer.Options | Options]] |||| Options set to change component behaviour.
 
| valign="top" | [[TFtpServer.Options | Options]] |||| Options set to change component behaviour.
 
|-
 
|-
| valign="top" | [[TFtpClient.ClientCount | ClientCount]] |||| Actual number of connected clients. Runtime only.
+
| valign="top" | [[TFtpClient.ClientCount | ClientCount]] |||| Current number of connected clients. Runtime only.
 
|-
 
|-
 
| valign="top" | [[TFtpClient.Client | Client]] |||| Array of connected clients. Runtime only.
 
| valign="top" | [[TFtpClient.Client | Client]] |||| Array of connected clients. Runtime only.
Line 34: Line 34:
 
| valign="top" | [[TFtpClient.Active | Active]] |||| Set/Get server state. Runtime only.
 
| valign="top" | [[TFtpClient.Active | Active]] |||| Set/Get server state. Runtime only.
 
|-
 
|-
| valign="top" | [[TFtpClient.Handle | Handle]] |||| Handle for underlaying hidden window. Runtime only.
+
| valign="top" | [[TFtpClient.Handle | Handle]] |||| Handle for underlying hidden window. Runtime only.
 
|-
 
|-
| valign="top" | [[TFtpClient.ServSocket | ServSocket]] |||| Underlaying listening socket. Runtime only.
+
| valign="top" | [[TFtpClient.ServSocket | ServSocket]] |||| Underlying listening socket. Runtime only.
 
|}
 
|}
  
Line 56: Line 56:
  
 
{|
 
{|
| valign="top" width="150" | [[TFtpClient.OnStart | OnStart]] |||| OnStart.
+
| valign="top" width="150" | [[TFtpServer.OnStart | OnStart]] |||| OnStart.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnStop | OnStop]] |||| OnStop.
+
| valign="top" | [[TFtpServer.OnStop | OnStop]] |||| OnStop.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnAuthenticate | OnAuthenticate]] |||| OnAuthenticate.
+
| valign="top" | [[TFtpServer.OnClientConnect | OnClientConnect]] |||| OnClientConnect.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnClientDisconnect | OnClientDisconnect]] |||| OnClientDisconnect.
+
| valign="top" | [[TFtpServer.OnAuthenticate | OnAuthenticate]] |||| OnAuthenticate.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnClientConnect | OnClientConnect]] |||| OnClientConnect.
+
| valign="top" | [[TFtpServer.OnClientDisconnect | OnClientDisconnect]] |||| OnClientDisconnect.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnClientCommand | OnClientCommand]] |||| OnClientCommand.
+
| valign="top" | [[TFtpServer.OnClientCommand | OnClientCommand]] |||| OnClientCommand.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnAnswerToClient | OnAnswerToClient]] |||| OnAnswerToClient.
+
| valign="top" | [[TFtpServer.OnAnswerToClient | OnAnswerToClient]] |||| OnAnswerToClient.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnChangeDirectory | OnChangeDirectory]] |||| OnChangeDirectory.
+
| valign="top" | [[TFtpServer.OnChangeDirectory | OnChangeDirectory]] |||| OnChangeDirectory.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnMakeDirectory | OnMakeDirectory]] |||| OnMakeDirectory.
+
| valign="top" | [[TFtpServer.OnMakeDirectory | OnMakeDirectory]] |||| OnMakeDirectory.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnBuildDirectory | OnBuildDirectory]] |||| OnBuildDirectory.
+
| valign="top" | [[TFtpServer.OnBuildDirectory | OnBuildDirectory]] |||| OnBuildDirectory.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnAlterDirectory | OnAlterDirectory]] |||| OnAlterDirectory.
+
| valign="top" | [[TFtpServer.OnAlterDirectory | OnAlterDirectory]] |||| OnAlterDirectory.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnStorSessionConnected | OnStorSessionConnected]] |||| OnStorSessionConnected.
+
| valign="top" | [[TFtpServer.OnStorSessionConnected | OnStorSessionConnected]] |||| OnStorSessionConnected.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnRetrSessionConnected | OnRetrSessionConnected]] |||| OnRetrSessionConnected.
+
| valign="top" | [[TFtpServer.OnStorSessionClosed | OnStorSessionClosed]] |||| OnStorSessionClosed.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnRetrSessionClosed | OnRetrSessionClosed]] |||| OnRetrSessionClosed.
+
| valign="top" | [[TFtpServer.OnRetrSessionConnected | OnRetrSessionConnected]] |||| OnRetrSessionConnected.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnRetrDataSent | OnRetrDataSent]] |||| OnRetrDataSent.
+
| valign="top" | [[TFtpServer.OnRetrSessionClosed | OnRetrSessionClosed]] |||| OnRetrSessionClosed.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnValidatePut | OnValidatePut]] |||| OnValidatePut.
+
| valign="top" | [[TFtpServer.OnRetrDataSent | OnRetrDataSent]] |||| OnRetrDataSent.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnValidateSize | OnValidateSize]] |||| OnValidateSize.
+
| valign="top" | [[TFtpServer.OnValidatePut | OnValidatePut]] |||| OnValidatePut.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnValidateDele | OnValidateDele]] |||| OnValidateDele.
+
| valign="top" | [[TFtpServer.OnValidateSize | OnValidateSize]] |||| OnValidateSize.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnValidateRmd | OnValidateRmd]] |||| OnValidateRmd.
+
| valign="top" | [[TFtpServer.OnValidateDele | OnValidateDele]] |||| OnValidateDele.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnValidateRnFr | OnValidateRnfr]] |||| OnValidateRnFr.
+
| valign="top" | [[TFtpServer.OnValidateRmd | OnValidateRmd]] |||| OnValidateRmd.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnValidateRnTo | OnValidateRnTo]] |||| OnValidateRnTo.
+
| valign="top" | [[TFtpServer.OnValidateRnFr | OnValidateRnfr]] |||| OnValidateRnFr.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnValidateGet | OnValidateGet]] |||| OnValidateGet.
+
| valign="top" | [[TFtpServer.OnValidateRnTo | OnValidateRnTo]] |||| OnValidateRnTo.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnStorDataAvailable | OnStorDataAvailable]] |||| OnStorDataAvailable.
+
| valign="top" | [[TFtpServer.OnValidateGet | OnValidateGet]] |||| OnValidateGet.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnGetUniqueFileName | OnGetUniqueFileName]] |||| OnGetUniqueFileName.
+
| valign="top" | [[TFtpServer.OnStorDataAvailable | OnStorDataAvailable]] |||| OnStorDataAvailable.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnGetProcessing | OnGetProcessing]] |||| OnGetProcessing.
+
| valign="top" | [[TFtpServer.OnGetUniqueFileName | OnGetUniqueFileName]] |||| OnGetUniqueFileName (STOU).
 
|-
 
|-
| valign="top" | [[TFtpClient.OnBuildFilePath | OnBuildFilePath]] |||| OnBuildFilePath.
+
| valign="top" | [[TFtpServer.OnGetProcessing | OnGetProcessing]] |||| OnGetProcessing.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnValidateMfmt | OnValidateMfmt]] |||| OnValidateMfmt.
+
| valign="top" | [[TFtpServer.OnBuildFilePath | OnBuildFilePath]] |||| OnBuildFilePath.
 
|-
 
|-
| valign="top" | [[TFtpClient.OnCalculateMd5 | OnCalculateMd5]] |||| OnCalculateMd5.
+
| valign="top" | [[TFtpServer.OnValidateMfmt | OnValidateMfmt]] |||| OnValidateMfmt (MFMT - modify file modification time).
 +
|-
 +
| valign="top" | [[TFtpServer.OnCalculateMd5 | OnCalculateMd5]] |||| OnCalculateMd5.
 
|}
 
|}
  

Latest revision as of 20:18, 17 January 2016

Main page -> ICS components reference -> TFtpServer

Overview

TFtpServer component is implementing the server side FTP protocol described in RFC 959. FTP protocol is the standard protocol for transfering files.

Properties

Addr IP address of the interface to listen on. Use 0.0.0.0 to listen on all interfaces.
Port TCP port to listen to.
Banner Welcome message sent to client.
UserData Data passed to each client instance.
MaxClients Maximum number of simultaneous clients to be accepted.
PasvIpAddr IP address used for passive mode.
PasvPortRangeStart TCP port range start to be used for passive mode.
PasvPortRangeSize TCP port range size to be used for passive mode.
Options Options set to change component behaviour.
ClientCount Current number of connected clients. Runtime only.
Client Array of connected clients. Runtime only.
Active Set/Get server state. Runtime only.
Handle Handle for underlying hidden window. Runtime only.
ServSocket Underlying listening socket. Runtime only.

Methods

Start Make the server listening for clients.
Stop Make the server stop listening for client. Doesn't disconnect connected clients.
Disconnect Disconnect a single client.
DisconnectAll Disconnect all clients.
IsClient Check if an object is actual a client.

Events

OnStart OnStart.
OnStop OnStop.
OnClientConnect OnClientConnect.
OnAuthenticate OnAuthenticate.
OnClientDisconnect OnClientDisconnect.
OnClientCommand OnClientCommand.
OnAnswerToClient OnAnswerToClient.
OnChangeDirectory OnChangeDirectory.
OnMakeDirectory OnMakeDirectory.
OnBuildDirectory OnBuildDirectory.
OnAlterDirectory OnAlterDirectory.
OnStorSessionConnected OnStorSessionConnected.
OnStorSessionClosed OnStorSessionClosed.
OnRetrSessionConnected OnRetrSessionConnected.
OnRetrSessionClosed OnRetrSessionClosed.
OnRetrDataSent OnRetrDataSent.
OnValidatePut OnValidatePut.
OnValidateSize OnValidateSize.
OnValidateDele OnValidateDele.
OnValidateRmd OnValidateRmd.
OnValidateRnfr OnValidateRnFr.
OnValidateRnTo OnValidateRnTo.
OnValidateGet OnValidateGet.
OnStorDataAvailable OnStorDataAvailable.
OnGetUniqueFileName OnGetUniqueFileName (STOU).
OnGetProcessing OnGetProcessing.
OnBuildFilePath OnBuildFilePath.
OnValidateMfmt OnValidateMfmt (MFMT - modify file modification time).
OnCalculateMd5 OnCalculateMd5.

How to


ICS Components Reference