OFTPConnection Type
A currently connected client.
Remarks
This type describes the connection of a client which is currently connected to the component. You may use the different fields of this type to manage the connection.
Fields
Compress Boolean |
Whether or not compression is used on the outgoing or incoming file. When sending files to the client, if Compress is true the file will be compressed. When receiving files, query this field to determine whether the file received from the client was compressed or not. Note that this is only applicable when Version 2.0 of the protocol is used as indicated by Version. | ||||||||||||||||||||||||||||||||||||||||||||||||
Connected Boolean |
This field is used to disconnect individual connections and/or show their status. The Connected field may be set to false to close the connection. Connected also shows the status of a particular connection (connected/disconnected). How and when the connection is closed is controlled by the Linger property. Please refer to its description for more information. | ||||||||||||||||||||||||||||||||||||||||||||||||
ConnectionId String |
This field contains an identifier generated by the component to identify each connection. This identifier is unique to this connection. | ||||||||||||||||||||||||||||||||||||||||||||||||
DownloadDirectory String |
The directory to which files will be saved. This specifies the directory where files received by the server will be saved.
This must be set before the client begins sending files. Set this in the Connected, AcceptConnection, or ConnectionRequest events, for instance:
oftpserver1.Connections[ "123456789" ].DownloadDirectory = "C:\\Downloads" ; | ||||||||||||||||||||||||||||||||||||||||||||||||
DownloadStream System.IO.Stream |
The stream to which the received file is written. If specified, when a file is received from the client it will be written to the specified stream. When set the file will not be written to disk and will only be written to the specified stream. This field may be set from within the AcceptFile event. | ||||||||||||||||||||||||||||||||||||||||||||||||
EncryptionAlgorithm OftpserverEncryptionAlgorithms |
The encryption algorithm used when sending files to the client. In order to use encryption, you must set the VirtualFileSecurityLevel field. The supported algorithms for encryption are:
Note that this is only applicable when Version 2.0 of the protocol is used as indicated by Version. | ||||||||||||||||||||||||||||||||||||||||||||||||
LocalAddress String |
This field shows the IP address of the interface through which the connection is passing. LocalAddress is important for multi-homed hosts where it can be used to find which particular network interface an individual connection is going through. | ||||||||||||||||||||||||||||||||||||||||||||||||
MaxRecordSize Integer |
This value determines the maximum length for a record in the outgoing virtual file. When VirtualFileFormat has been set to ffUnstructured or ffText, this value must be zero. When ffFixed or ffVariable, this must be set to a value greater than 0, containing the maximum line length of the outgoing file. | ||||||||||||||||||||||||||||||||||||||||||||||||
ReadyToSend Boolean |
Specifies whether or not the server can send to the client. When the client passes control to the server, this field will be true. Additionally the ReadyToSend event will fire at this time. This must be true before sending files to the client. | ||||||||||||||||||||||||||||||||||||||||||||||||
RecipientCertStore String |
The name of the certificate store for the recipient certificate. The RecipientCertStoreType field specifies the type of the certificate store specified by RecipientCertStore. If the store is password protected, specify the password in RecipientCertStorePassword. RecipientCertStore is used in conjunction with the RecipientCertSubject field in order to specify client certificates. If RecipientCertStore has a value, and RecipientCertSubject is set, a search for a certificate is initiated. Please refer to the RecipientCertSubject field for details. Designations of certificate stores are platform-dependent. The following are designations of the most common User and Machine certificate stores in Windows:
When the certificate store type is PFXFile, this property must be set to the name of the file. When the type is PFXBlob, the property must be set to the binary contents of a PFX file (i.e. PKCS12 certificate store). Note that this is only applicable when Version 2.0 of the protocol is used as indicated by Version. | ||||||||||||||||||||||||||||||||||||||||||||||||
RecipientCertStoreB Byte[] |
The name of the certificate store for the recipient certificate. The RecipientCertStoreType field specifies the type of the certificate store specified by RecipientCertStore. If the store is password protected, specify the password in RecipientCertStorePassword. RecipientCertStore is used in conjunction with the RecipientCertSubject field in order to specify client certificates. If RecipientCertStore has a value, and RecipientCertSubject is set, a search for a certificate is initiated. Please refer to the RecipientCertSubject field for details. Designations of certificate stores are platform-dependent. The following are designations of the most common User and Machine certificate stores in Windows:
When the certificate store type is PFXFile, this property must be set to the name of the file. When the type is PFXBlob, the property must be set to the binary contents of a PFX file (i.e. PKCS12 certificate store). Note that this is only applicable when Version 2.0 of the protocol is used as indicated by Version. | ||||||||||||||||||||||||||||||||||||||||||||||||
RecipientCertStorePassword String |
If the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store. Note that this is only applicable when Version 2.0 of the protocol is used as indicated by Version. | ||||||||||||||||||||||||||||||||||||||||||||||||
RecipientCertStoreType CertStoreTypes |
The type of certificate store for this certificate. The component supports both public and private keys in a variety of formats. When the cstAuto value is used the component will automatically determine the type. This field can take one of the following values:
Note that this is only applicable when Version 2.0 of the protocol is used as indicated by Version. | ||||||||||||||||||||||||||||||||||||||||||||||||
RecipientCertSubject String |
The subject of the recipient certificate. Note that this is only applicable when Version 2.0 of the protocol is used as indicated by Version. | ||||||||||||||||||||||||||||||||||||||||||||||||
RemoteHost String |
This field shows the IP address of the remote host through which the connection is coming. The connection must be valid or an error will be fired. If the component is configured to use a SOCKS firewall, the value assigned to this property may be preceded with an "*". If this is the case, the host name is passed to the firewall unresolved and the firewall performs the DNS resolution. | ||||||||||||||||||||||||||||||||||||||||||||||||
RemotePort Integer |
This field shows the TCP port on the remote host through which the connection is coming. The connection must be valid or an error will be fired. | ||||||||||||||||||||||||||||||||||||||||||||||||
SFIDCode String |
The connected client's SFID code. The SFID code identifies the origin or destination party that is sending or receiving a file, while the SSID code identifies the party that a session is established with. If the SFID and SSID codes do not match, then the party the session is established with is acting as an intermediary, and the party identified by the SFID code is either the origin or final destination. When acting as an intermediary the component will not perform any security services (i.e. sign, verify, encrypt, decrypt). Security services are to be performed by the origin or destination only. Data should simply be passed along by an intermediary. | ||||||||||||||||||||||||||||||||||||||||||||||||
SignedReceipt Boolean |
Indicates whether a signed receipt is requested. When sending files, if this is set to true a signed receipt will be requested. In that case RecipientCertStoreType, RecipientCertStore, and RecipientCertSubject must be set to specify the public certificate that will be used to verify the signature on the receipt returned by the client after SendFile is called. The component will automatically verify the signature on the returned receipt. When receiving files, query this field to determine if the client requested a signed receipt. If true, the Certificate property must be set to a certificate with private key in order to sign the receipt that will be returned to the client. The component will sign and deliver the receipt automatically. Note that this is only applicable when Version 2.0 of the protocol is used as indicated by Version. | ||||||||||||||||||||||||||||||||||||||||||||||||
SSIDCode String |
The connected client's SSID code. | ||||||||||||||||||||||||||||||||||||||||||||||||
Timeout Integer |
A timeout for the component. If the Timeout field is set to 0, all operations will run uninterrupted until successful completion or an error condition is encountered. If Timeout is set to a positive value, the component will wait for the operation to complete before returning control. The component will use DoEvents to enter an efficient wait loop during any potential waiting period, making sure that all system events are processed immediately as they arrive. This ensures that the host application does not "freeze" and remains responsive. If Timeout expires, and the operation is not yet complete, the component throws an exception. Please note that by default, all timeouts are inactivity timeouts, i.e. the timeout period is extended by Timeout seconds when any amount of data is successfully sent or received. The default value for Timeout is specified by the DefaultTimeout property. | ||||||||||||||||||||||||||||||||||||||||||||||||
UploadStream System.IO.Stream |
The stream to read from when sending a file to a client. If specified, when SendFile is called the stream will be read from the current position and the data will be sent to the client. Using this field means that the file does not have to exist on disk to be sent to the client. When calling SendFile specify empty string as the FileName parameter value. | ||||||||||||||||||||||||||||||||||||||||||||||||
Version TOFTPVersions |
This holds the version of OFTP supported by the client. This value cannot be changed. All communication with the client is performed using the version returned by this field. Possible values are:
| ||||||||||||||||||||||||||||||||||||||||||||||||
VirtualFileDate String |
Set this to the date/time stamp for the virtual file before sending. If this is not set when sending a file, the current date/time will be used. This property will accept various date formats, but will return the following format only: "MM/dd/yyyy HH:mm:ss". Supported date formats:
| ||||||||||||||||||||||||||||||||||||||||||||||||
VirtualFileFormat VirtualFileFormats |
The structure of the outgoing or incoming file. When sending files, set this field to specify the format to apply to outgoing files. When receiving files, query this field to determine the structure of the file received from the client. The following values are valid file formats for outgoing virtual files:
Note: When either VirtualFileSecurityLevel has been set to a value other than slNone or Compress has been set to true, all files become ffUnstructured except ffVariable files. | ||||||||||||||||||||||||||||||||||||||||||||||||
VirtualFileSecurityLevel VirtualFileSecurityLevels |
Specifies security options for the outgoing or incoming file. When receiving files, query this field to determine the security level of the file received from the client. When sending files to the client, this field will be used to determine what security options apply to the outgoing file. Possible values are:
Note that this is only applicable when Version 2.0 of the protocol is used as indicated by Version. |
Constructors
public OFTPConnection();
Public OFTPConnection()