swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax     Other Library Functions  
OMX  

TCPConnection

 
 

Library: TCP/IP client and server support (OMTCP) original
Include: omtcp.xin


Purpose

The TCPConnection OMX component allows you to create a connection to a remote machine using the TCP/IP (Transmission Control/Internet) protocol. Once the connection is made, you can communicate with the remote machine.

The OmniMark TCP/IP dynamic link library file ("omtcp.dll" or "omtcp.so") creates the TCPConnection OMX component. The related include file ("omtcp.xin") defines the interface to that component. To use TCPConnection components in your program, you must include the following declaration and include statement in your program:

     include "omtcp.xin"

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

     include "omtcp.xin"
     
     global TCPConnection my-tcpcon-1
     global TCPConnection my-tcpcon-2
     
     process
        local TCPConnection my-tcpcon-3
        local TCPConnection my-tcpcon-4

Once you have declared your TCPConnection OMX variables, you can use those variables to create TCP connections to remote machines using the TCPConnectionOpen function in the original TCP/IP library. For example:

     include "omtcp.xin"
     
     process
        local TCPConnection my-tcpcon
        
        set my-tcpcon to TCPConnectionOpen on "banzai.com"
                                           at "5600"

Assuming no errors occur when establishing the connection to the remote machine, you can now communicate with that machine via the TCP protocol using the other TCPConnection functions.

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

    Related Syntax
   TCPConnectionOpen
   TCPConnectionClose
   TCPConnectionIsInError
   TCPConnectionGetStatusReport
   TCPConnectionIsConnected
   TCPConnectionGetPeerName
   TCPConnectionGetPeerIP
   TCPConnectionGetOutput
   TCPConnectionGetSource
   TCPConnectionSignalSourceEnd
   TCPConnectionPut
   TCPConnectionGetCharacters
   TCPConnectionGetLine
   TCPConnectionSetBuffering
 
  Other Library Functions
   TCPConnection
   TCPConnectionClose
   TCPConnectionGetCharacters
   TCPConnectionGetLine
   TCPConnectionGetOutput
   TCPConnectionGetPeerIP
   TCPConnectionGetPeerName
   TCPConnectionGetSource
   TCPConnectionGetStatusReport
   TCPConnectionHasCharactersToRead
   TCPConnectionIsConnected
   TCPConnectionIsInError
   TCPConnectionOpen
   TCPConnectionPut
   TCPConnectionSetBuffering
   TCPConnectionSignalSourceEnd
   TCPIsVersionCompatible
   TCPLibraryVersion
   TCPService
   TCPServiceAcceptConnection
   TCPServiceClose
   TCPServiceGetPort
   TCPServiceGetStatusReport
   TCPServiceIsInError
   TCPServiceIsOpen
   TCPServiceOpen
   TCPTraceConnectionOpen
 
 

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

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:27:39 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.