|
|||||
|
||||||
Related Syntax | Other Library Functions |
OMX |
tcp.service |
Library: TCP/IP client and server support (OMTCP)
Import: omtcp.xmd |
The tcp.service OMX component represents a service assigned to listen at a specific location (port) for TCP connection requests from client machines.
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.
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.
Copyright © Stilo International plc, 1988-2008.