TCPConnectionOpen
Full Description
swirl
Syntax
  define external TCPConnection function TCPConnectionOpen
        on value stream host-name
        at value counter port-number
      timeout value counter 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:

  • "host-name" is the name or IP address of the connection host.
  • "port-number" is the port the connection is on.
  • "timeout-in-milliseconds" is how long the function will attempt to make connection before aborting.

Example:

  local TCPConnection client

  set client to TCPConnectionOpen on "123.123.123.45" at 5600

Copyright © OmniMark Technologies Corporation, 1988-1998.