See Also

Invoke Members  | Dart.PowerTCP.Ftp Namespace

Requirements

Namespace: Dart.PowerTCP.Ftp

Platforms: Windows 98, Windows NT 4.0, Windows ME, Windows 2000, Windows XP, Windows Server 2003, Windows Vista

Assembly: Dart.PowerTCP.Ftp (in Dart.PowerTCP.Ftp.dll)

Language

Visual Basic

C#

C++

C++/CLI

Show All

See Also Requirements Languages PowerTCP FTP for .NET

Invoke Class

Dart.PowerTCP.Ftp Namespace : Invoke Class (Dart.PowerTCP.Ftp)

Presents the results from an Internet protocol Request/Response pair.

For a list of all members of this type, see Invoke members.

Object Model


Inheritance Hierarchy

System.Object
   Dart.PowerTCP.Ftp.Invoke

Syntax

[Visual Basic]
Public Class Invoke
[C#]
public class Invoke
[C++]
public __gc class Invoke
[C++/CLI]
public ref class Invoke

Remarks

Many Internet protocols are based on a request/reply system, where the client sends a request, and the server sends at least one reply. This continues lock-step until communication is complete. The Invoke object encapsulates these request/reply pairs.

In PowerTCP commands are often sent using the Object.Invoke or Object.BeginInvoke methods. When a command is sent an Invoke object is returned describing both the request and response. The response is encapsulated by the Invoke.Response property, which allows easy access to the raw and parsed response from the server. The request is represented by the Invoke.Request property, a string containing the request sent.

Example

The following example demonstrates using Invoke to send a command.

[Visual Basic] 

' Set server and user properties. This will allow us to call other
' Ftp Component methods with the log in taking place "behind the scenes"
Ftp1.Server = "MyFTPServer"
Ftp1.Username = "blah"
Ftp1.Password = "mypass"

' Invoke a command
Dim invoke as Dart.PowerTCP.Ftp.Invoke
Try
   invoke = Ftp1.Invoke(FtpCommand.NoOp)
Catch ex as Exception
   Debug.WriteLine("Error: " + ex.Message)
   Exit Sub
End Try

' Success
Debug.WriteLine("Request/Response messages: " + invoke.ToString())

[C#] 

// Set server and user properties. This will allow us to call other
// Ftp Component methods with the log in taking place "behind the scenes"
ftp1.Server = "MyFTPServer";
ftp1.Username =
"blah";
ftp1.Password =
"mypass";

// Invoke a command
Dart.PowerTCP.Ftp.Invoke invoke;
try
{
  
invoke = ftp1.Invoke(Dart.PowerTCP.Ftp.FtpCommand.NoOp);
}
catch (Exception ex)
{
   Debug.WriteLine(
"Error: " + ex.ToString());
   
return;
}

// Success
Debug.WriteLine("Request/Response messages: " + invoke.ToString());
                

Requirements

Namespace: Dart.PowerTCP.Ftp

Platforms: Windows 98, Windows NT 4.0, Windows ME, Windows 2000, Windows XP, Windows Server 2003, Windows Vista

Assembly: Dart.PowerTCP.Ftp (in Dart.PowerTCP.Ftp.dll)

See Also

Invoke Members  | Dart.PowerTCP.Ftp Namespace

 

Send comments on this topic.

Documentation version 3.0.5.0.

© 2009 Dart Communications.  All rights reserved.