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

tcp.service

 
 

Library: TCP/IP client and server support (OMTCP)
Import: omtcp.xmd


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.

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".

     import "omtcp.xmd" prefixed by tcp.
  
     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:

     import "omtcp.xmd" prefixed by tcp.
  
     process
        local tcp.service Service
  
        set Service to tcp.create-service on 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.

    Related Syntax
   tcp.port
   tcp.accept-connection
   tcp.destroy-service
   tcp.create-service
 
  Other Library Functions
   tcp.accept-connection
   tcp.connect
   tcp.connection
   tcp.create-service
   tcp.destroy-service
   tcp.disconnect
   tcp.end-delimited
   tcp.get-string
   tcp.is-connected
   tcp.multi-packet
   tcp.omtcp-version
   tcp.peer-ip
   tcp.peer-name
   tcp.port
   tcp.put-string
   tcp.reader
   tcp.service
   tcp.set-buffering
   tcp.single-packet
   tcp.terminate-reader
   tcp.wait-for-input
   tcp.writer
 
 

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.