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

TCPServiceGetPort

 
 

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

The service port number the TCP service object listens to for an incoming connection.


Declaration

  define external integer function TCPServiceGetPort
        value TCPService this-TCPService
  as TCPServiceGetPort


Purpose

This function is used to learn which service port number the TCP service object listens to for incoming connections. This API is particularly useful when you call TCPServiceOpen without stating a port number explicitly. In this case, TCPServiceOpen chooses an available port, and TCPServiceGetPort can then be used to learn about the chosen port.

Argument:

Example

  local TCPService omdemo-service
  local integer port

  set omdemo-service to TCPServiceOpen
  set port to TCPServiceGetPort omdemo-service
  output "The selected service port for omdemo-service is %d(port)%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:54 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.