Back to product page

Connect function


Appends to a remote file.

Type

A Long value. If successful, 0 is returned, otherwise error as specified here

Syntax

  • C
long Sftp_Connect(void *Sftp);
The Connect(void *Sftp) syntax has these parts:
void *SftpThe Handle of the created Sftp instance.

Remarks

The Connect function will initiate a connection between wodSFTP and a remote server. It can be used only if wodSFTP is not connected with a server at the time the call is made (in other words, if State is set to Disconnected).

If an error occurs while connecting, the Connected callback will be called with ErrorCode set to the error that occured. If ErrorCode is set to 0, wodSFTP successfully connected with the remote server.

Upon connection, wodSFTP may perform an initial 'handshake' with the remote server (it will negotiate encryption algorithms and other properties related to a secured connection.) If you see your modem lamps flashing but you haven't received the Connected event yet - don't worry. This is because wodSFTP has connected and is transmitting/receiving packets as part of this negotiation.

After the handshake is complete, wodSFTP may perform automatic authentication with the server.

Platforms

Windows