TCPServiceGetPort
Full Description
swirl
Syntax
  define external counter 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:

  • "this-TCPService" is an opaque object of type TCPService

Example

  local TCPService omdemo-service
  local counter port

  set omdemo-service to TCPServiceOpen
  set port to TCPServiceGetPort omdemo-service
  output "The selected service port for omdemo-service is %d(port)%n"

Copyright © OmniMark Technologies Corporation, 1988-1998.