Checking-connection-State - WeOnlyDo Software example code



All

wodCrypt (12)
wodSSH (10)
wodSFTP (23)
wodSSHServer (1)
wodSSHTunnel (11)
wodSSHpackage
wodSFTPdll

wodSSH.NET (10)
wodSFTP.NET (24)
wodFtpDLX.NET (22)
wodWebServer.NET (10)

wodAppUpdate (13)
wodHttpDLX (8)
wodFtpDLX (22)
wodTelnetDLX
wodFTPServer (3)
wodWebServer (10)
wodVPN
wodXMPP (13)
All ** [Visual Basic] ** [C#] ** [VB.NET] **

Checking connection State
Set Protocol property to change the protocol in below code
VB code
Dim WithEvents wodFtpDLX As wodFtpDLXCom
Private Sub Form_Load()

    Set wodFtpDLX = New wodFtpDLXCom

    With wodFtpDLX
        .HostName = "xx"
        .Login = "xx"
        .Password = "xx"
        .Protocol = FTP
        .Connect
    End With

    '...
    ' Now at any time you can check connection state by using code like this

    MsgBox "Component is currently in following state:" & vbCrLf & wodFtpDLX.StateText(wodFtpDLX.State)

    '...
    ' Disconnect when done...
    wodFtpDLX.Disconnect

End Sub
C# code
private WeOnlyDo.Client.FtpDLX wodFtpDLX;
private void Form1_Load(object sender, EventArgs e)
{
    wodFtpDLX = new WeOnlyDo.Client.FtpDLX();

     wodFtpDLX.Hostname = "xx";
     wodFtpDLX.Login = "xx";
     wodFtpDLX.Password = "xx";
     wodFtpDLX.Protocol = WeOnlyDo.Client.Protocols.FTP;

     wodFtpDLX.Connect();

     //...
    // Now at any time you can check connection state by using code like this

    MessageBox.Show("Component is currently in following state:" + Environment.NewLine + wodFtpDLX.StateText(wodFtpDLX.State));

    //...
    // Disconnect when done...
    wodFtpDLX.Disconnect();

}
VB.NET code
Dim WithEvents wodFtpDLX As WeOnlyDo.Client.FtpDLX
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    wodFtpDLX = New WeOnlyDo.Client.FtpDLX

    wodFtpDLX.Hostname = "xx"
    wodFtpDLX.Login = "xx"
    wodFtpDLX.Password = "xx"
    wodFtpDLX.Protocol = WeOnlyDo.Client.Protocols.FTP

    wodFtpDLX.Connect()

    '...
    ' Now at any time you can check connection state by using code like this
    MsgBox("Component is currently in following state:" & vbCrLf & wodFtpDLX.StateText(wodFtpDLX.State))

    '...
    ' Disconnect when done...
    wodFtpDLX.Disconnect()

End Sub