Back to product page

ConnectedEvent event


Fires when wodFtpDLX.NET connects to remote server.

Syntax

  • C#
  • VB.NET
delegate void ConnectedDelegate(object Sender,FtpConnectedArgs Args);
The ConnectedEvent(Args.Error) syntax has these parts:
Args.ErrorException. Error that occurred, if any.

Delegate Sub ConnectedDelegate(ByVal Sender As Object, ByVal Args As FtpConnectedArgs)
The ConnectedEvent(Args.Error) syntax has these parts:
Args.ErrorException. Error that occurred, if any.

Remarks

Connected event will be fired always after Connect method is issued. If wodFtpDLX.NET successfully connected to server, Args.Error will be set to null (Nothing in VB), and you can start sending/receiving data from server. If Args.Error is different than null, then wodFtpDLX.NET will immidiatelly close the connection.

It is possible that wodFtpDLX.NET will internally negotiate connection parameters, before Connected event is fired at all. This is done to make wodFtpDLX.NET as much transparent to protocol used as possible. You might notice packets transmitted to/from server in the meantime, meaning wodFtpDLX.NET connected already but is still negotiating protocol parameters.

You can put your code inside this event, but if you did set Blocking property to True then DO NOT execute new methods within the event.

Platforms

Windows