swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
      Other Library Functions  
function  

TCPConnectionOpen

 
 

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

A TCP connection object.


Declaration

  define external TCPConnection function TCPConnectionOpen
        on value stream host-name
        at value integer port-number
      timeout value integer timeout-in-milliseconds optional
  as TCPConnectionOpen


Purpose

This function is used by a client program to establish a connection to a server program that is running on a specific host machine and port.

The timeout value, if specified, applies only to the wait for the connection. If the timeout is exceeded, the connection fails. If the timeout is not specified, TCPConnectionOpen "blocks" until a connection is made or some other cause of failure is encountered.

If TCPConnectionOpen fails, it still returns a TCP connection object. This failure object is in error and is not connected.

Arguments:

Example:

  local TCPConnection client

  set client to TCPConnectionOpen on "123.123.123.45" at 5600

        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 ] [ LEGACYLIBRARIES ] [ ERRORS ]

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:51 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.