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

TCPTraceConnectionOpen

 
 

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

A TCP connection object.


Declaration

  define TCPConnection function TCPTraceConnectionOpen
     on value stream host-name
        at value integer port-number
        title value stream trace-title
        timeout value integer timeout-in-milliseconds optional
  as
     local TCPConnection TCPTraceConnection


Purpose

This function opens a TCP network connection to a trace server program running on the host specified by "host-name" at the port specified by "port-number." It returns a TCP connection object that can be used to send trace messages. The "trace-title" is a way to title (label) the trace connection. The trace server program could, for example, use "trace-title" as a title for a window that displays trace messages sent through the related trace connection object.

TCPTraceConnectionOpen appends "%13#%10#" to the user-specified title. The trace server considers the first line (text ending with "%13#%10#") that is sent to be a title. Therefore, "trace-title" should not contain "%13#%10#".

If TCPTraceConnectionOpen fails, it still returns a TCP connection object. This failure object is in error and is closed. The timeout value, if specified, applies only to the wait for the connection. If timeout is exceeded, the connection fails. If timeout is not specified, TCPTraceConnectionOpen "blocks" until a connection is made or some other cause of failure is encountered.

Arguments:

Example:

  local TCPConnection tracer
  local stream match-rule-trace

   open match-rule-trace as
        TCPTraceConnectionOpen
             on "monitor"
             at 5730
             title "Tracing match rules"

   put match-rule-trace "rule x fired%n"

        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:55 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.