OFTPConnection Type
A currently connected client.
Remarks
This type describes the connection of a client which is currently connected to the class. You may use the different fields of this type to manage the connection.
Fields
compress Bool |
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 property 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 Bool |
This property is used to disconnect individual connections and/or show their status. The Connected property 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 property contains an identifier generated by the class 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.SetOFTPConnectionDownloadDirectory(123456789, "C:\\Downloads"); | ||||||||||||||||||||||||||||||||||||||||||||||||
encryptionAlgorithm OftpserverEncryptionAlgorithms |
The encryption algorithm used when sending files to the client. In order to use encryption, you must set the VirtualFileSecurityLevel property. 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 property 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 Int32 |
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 Bool |
Specifies whether or not the server can send to the client. When the client passes control to the server, this property will be true. Additionally the ReadyToSend event will fire at this time. This must be true before sending files to the client. | ||||||||||||||||||||||||||||||||||||||||||||||||
recipientCertStoreB Data |
The name of the certificate store for the recipient certificate. The RecipientCertStoreType property 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 property 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 property 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. | ||||||||||||||||||||||||||||||||||||||||||||||||
recipientCertStore String |
The name of the certificate store for the recipient certificate. The RecipientCertStoreType property 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 property 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 property 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 class supports both public and private keys in a variety of formats. When the cstAuto value is used the class will automatically determine the type. This property 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. This property must be set after all other certificate properites are set. When this property is set, a search is performed in the current certificate store certificate with matching subject. If a matching certificate is found, the property is set to the full subject of the matching certificate. If an exact match is not found, the store is searched for subjects containing the value of the property. If a match is still not found, the property is set to an empty string, and no certificate is selected. The special value "*" picks a random certificate in the certificate store. The certificate subject is a comma separated list of distinguished name fields and values. For instance "CN=www.server.com, OU=test, C=US, E=support@nsoftware.com". Common fields and their meanings are displayed below.
If a field value contains a comma it must be quoted. Note that this is only applicable when Version 2.0 of the protocol is used as indicated by Version. | ||||||||||||||||||||||||||||||||||||||||||||||||
remoteHost String |
This property 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 class 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 Int32 |
This property 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 Bool |
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 class will automatically verify the signature on the returned receipt. When receiving files, query this property 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 class 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 Int32 |
A timeout for the class. If the Timeout property 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 class will wait for the operation to complete before returning control. The class 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 class . 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. | ||||||||||||||||||||||||||||||||||||||||||||||||
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 property. 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 property to specify the format to apply to outgoing files. When receiving files, query this property 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 property to determine the security level of the file received from the client. When sending files to the client, this property 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 init()