IPCLinkEndpoint::AsyncReceiveMessage (open)

Receive a message, returns a promise that will be fulfilled when the message arives. Resolves with same status messages as ReceiveMessage

Syntax

LOADLIB "wh::internal/jobs.whlib";

OBJECT FUNCTION AsyncReceiveMessage(DATETIME wait_until)

Parameters

DATETIME wait_until

Resolve with status 'timeout' if the message hasn't arrived at this time.

Return value

OBJECT
Possible objecttypes:

Result for the result of the action

RECORD msg

The received message (only when status = 'ok')

INTEGER64 msgid

Id of the message (only when status = 'ok')

INTEGER64 replyto

Id message this item is a reply to (0 if not a reply)

status

One of the following codes: 'ok': message received successfully 'timeout': no message was present 'gone': other endpoint of the link has been closed