![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|||||
|
|
|||||
| function | TCPServiceAcceptConnection | ||||
| Related Concepts | Other Library Functions |
|
Library: TCP/IP
Include: omioprot.xin, omtcp.xin |
Returns: Opaque
Returns a TCP connection object. |
define external TCPConnection function TCPServiceAcceptConnection
value TCPService this-TCPService
TCPServiceAcceptConnection is used by a server program to listen and accept incoming client-initiated service requests.
If TCPServiceAcceptConnection fails, it still returns a TCP connection object. This failure object is in error and is closed. If the passed TCP service object itself is in error, or was never opened, TCPServiceAcceptConnection simply fails.
Argument:
Example:
local TCPService omdemo-service
local TCPConnection client
set omdemo-service to TCPServiceOpen at 5600
repeat
set client to TCPServiceAcceptConnection omdemo-service
;process request
again
| ---- |