Description
CheckMessage() is used to check for a waiting message on the NETLink created through this port.
Call Signature
NETLink ptrCheckMessage ( double timeout_seconds )
Return Value
NETLink ptr
The function will return a zero (NULL) value if no messages are waiting, or arrive within the timeout period. Otherwise, a pointer to a NETLink with a pending message is returned.
Argument
double timeout_seconds:
The number of seconds to wait for a message to arrive. If this is zero there will be no waiting for a message to come in. This value may be a fraction of a second.
Remarks
New NETLink objects are created when remote processes connect to this NETPort using the NETLinkOpen() intrinsic and the port number on this system that corresponds to this NETPort (see PortID() method).
Example
This example shows a simple main server loop that blocks for a long time waiting for messages and processing them.
local NETLink ptr poLink, char acCmdName[32] MainLoop: rem poLink = poPort.CheckMessage( 1.0 ) if( poLink <> NULL )then call poLink.Accept( acCmdName ) ... process request based on command name ... endif goto MainLoop;
See also
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.