This method initiates connections to each destination server defined for the project.
Syntax
ReplicationClient.Connect
Remarks
You must have Site Server Publishing administrator privileges on the server to call this method.
If you use the SendFile and DeleteFile methods without the Connect and Disconnect methods, SendFile and DeleteFile each perform their own connecting and disconnecting to the destination server. Connect and Disconnect let you avoid this overhead, which can be significant when updating more than a few files.
Example
The following example connects to Project1, sends some files, and disconnects.
Option Explicit
On Error Resume Next
dim Client
set Client = CreateObject("CrsApi.ReplicationClient")
Client.Initialize("Project1")
Client.Connect
Client.SendFile("newfile.htm")
...
Client.Disconnect
'Release Client object
set Client = Nothing
See Also