swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Topics   Other Library Functions  
data type  

FTPConnection

 
 

Library: FTP support (OMFTP)
Include: omftp.xin


Purpose

The FTPConnection opaque data type allows you to create a connection to an FTP server. Once that connection is made, you can send data to and retrieve data from the FTP server.

The OmniMark FTP dynamic link library file ("omftp.dll" or "omftp.so") creates the FTPConnection data type. The related include file ("omftp.xin") defines the interface to that data type. To use FTPConnection data types in your program, you must include the following declaration and include statement in your program:

     include "omftp.xin"

Within your program, you can create as many instances of the FTPConnection data type as you require by declaring global and local variables of type "FTPConnection". For example:

     include "omftp.xin"
  
     global FTPConnection my-ftp-1
     global FTPConnection my-ftp-2
  
     process
        local FTPConnection my-ftp-3
        local FTPConnection my-ftp-4

Once you have declared your FTPConnection variables, you can use them in the FTPConnectionOpen function from the OmniMark FTP library to create connections to FTP servers. For example:

     include "omftp.xin"
  
     process
        local FTPConnection my-ftp-connection
  
        set my-ftp-connection to FTPConnectionOpen server   "banzai.com"
                                                   user     "buckaroo"
                                                   password "watermelon"

Assuming that no errors occur when establishing the connection to the FTP server, you can now send data to and receive data through the connection by using the other functions in the OmniMark FTP library.

The FTPConnection data type is not copyable. This means that when you set the value of one FTPConnection variable to the value of another FTPConnection variable, you end up with two variables pointing at the same external object. You are able to manipulate both variables, but you are performing those manipulations on the same FTP connection, whether you use the original FTPConnection variable or its copy.

    Related Topics
 
Other Library Functions
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:38:10 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.