function
Library: TCP/IP client and server support (OMTCP legacy, OmniMark versions 4 - 6.0.1)
Include: omtcp.xin |
define external function TCPServiceClose value TCPService this-TCPService
This function closes a TCP service object, effectively detaching the program from the TCP port. Once closed, no more client connection requests can be accepted.
It is valid to use TCPServiceClose
on a TCP service object that is already closed or that was never opened. In both cases, TCPServiceClose
simply does nothing.
Note that allowing an OmniMark TCP service variable to go out of scope (exiting a local scope for a local variable, or exiting the OmniMark program for a global variable) has the effect of doing a TCPClose
on the variable. As long as TCP service variables are declared at a scope level that corresponds to the lifetime of the service (which is good programming practice) there is never any need to use TCPClose
.
Argument:
Example
TCPServiceClose omdemo-service