Discuss this help topic in SecureBlackbox Forum

Use custom sockets in Simple client classes

So-called "Simple" client classes (TElSimpleSSLClient, TElSimpleSSHClient, TElSimpleSFTPClient, TElSimpleFTPSClient, TElHTTPSClient, TElSMTPClient etc.) that offer implementation of popular network protocols have a powerful built-in TCP socket that can connect via Web Tunneling (HTTP CONNECT) and SOCKS proxies, has bandwidth control, supports IPv6 and International Domain Names (IDN) and can use custom DNS servers and DNSSEC. Still if you need to make the client work via your own socket or even some other communication channel (eg. named pipe or some custom protocol), you can do this! The above mentioned client classes can use events to send and receive data so your application can transfer the data the way you like.

To use the external socket, set UseInternalSocket property of the corresponding object to false. Next, assign the event handlers for OnSend, OnReceive and OnCloseConnection events:

  • OnSend event is fired when the component needs to send the data to the remote server.
  • OnReceive is fired when the component needs to read the remote data from the socket.
  • OnCloseConnection is fired, if the component has closed protocol-level connection and requires that you close socket connection.
When your application detects availability of the data in the socket, it needs to call DataAvailable method of the corresponding client class. The client class in turn would fire OnReceive event.

How To articles about client-side FTPS questions

Discuss this help topic in SecureBlackbox Forum