swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
      Other Library Functions  
OMX  

tcp-service

 
 

Library: TCP/IP client and server support (OMTCP) legacy
Include: omtcp.xin


Purpose

The tcp-service OMX component represents a service assigned to listen at a specific location (port) for TCP connection requests from client machines.

Usage Notes

The tcp-service OMX component is not copyable. This means that when you set the value of one tcp-service OMX variable to the value of another tcp-service OMX variable, you end up with two variables pointing at the same OMX component. You are able to get information about the TCP service through both variables, but that information is coming from the same external object whether you use the original tcp-service OMX variable or its copy.

Once the connection is made (represented by a tcp connection object), you can communicate with the client machine.

To use tcp-service objects in your program, you must include the following include statement in your program:

     include "omtcp.xin"

Example

Within your program, you can create as many instances of the tcp-service OMX component as you require by declaring global and local variables of type "tcp-service".

     include "omtcp.xin"
  
     global tcp-service Service-1
     global tcp-service Service-2
  
     process
        local tcp-service Service-3
        local tcp-service Service-4

Once you have declared your tcp-service OMX variables, you can use those variables to create a TCP service on your machine. For example:

     include "omtcp.xin"
  
     process
        local tcp-service Service
  
        set Service to tcp-create-service at 5600

Assuming that no errors occur when setting up the service, remote machines are now able to create a TCP connection with your system on the port you specified.

        Other Library Functions
   tcp-accept-connection
   tcp-connect
   tcp-connection
   tcp-create-service
   tcp-destroy-service
   tcp-disconnect
   tcp-get
   tcp-has-characters
   tcp-is-connected
   tcp-is-version-compatible
   tcp-library-version
   tcp-peer-ip
   tcp-peer-name
   tcp-port
   tcp-put
   tcp-service
   tcp-set-buffering
   tcp-signal-source-end
   tcp-sink
   tcp-source
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:27:39 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.