IPCLinkEndpoint (open)
This objecttypes contains the endpoint of an IPC link. You can send messages to the other endpoint of the link, and receive messages from the other endpoint.
If you need to wait on a message, you can use the @a handle property as a parameter to WaitForMultiple. The handle is signalled when a message is in queue, or when the other endpoint is closed.
Syntax
LOADLIB "wh::internal/jobs.whlib";
OBJECTTYPE IPCLinkEndpoint
Constructor
- MACRO NEW(INTEGER endpointid)
Constructs a new IPCLinkEndpoint
Variables
- RECORD userdata (inherited from __HS_INTERNAL_OutputObject)
Data for the user of this object
Properties
- PROPERTY autothrow
Throw received exceptions (in __exception cell within messages) automatically
- PROPERTY handle (inherited from __HS_INTERNAL_OutputObject)
Handle
Functions
- OBJECT FUNCTION AsyncDoRequest(RECORD message)
Sends a message and waits for the reply. Throws if a reply to another messages comes in.
- OBJECT FUNCTION AsyncReceiveMessage(DATETIME wait_until)
Receive a message, returns a promise that will be fulfilled when the message arives. Resolves with same status messages as ReceiveMessage
- OBJECT FUNCTION AsyncWaitRead(DATETIME until) (inherited from __HS_INTERNAL_OutputObject)
Returns a promise that will be resolved when this output object becomes read signalled
- MACRO Close()
Closes this endpoint.
- RECORD FUNCTION DoRequest(RECORD message)
Sends a message and waits for the reply. Throws if a reply to another messages comes in.
- BOOLEAN FUNCTION IsReadSignalled() (inherited from __HS_INTERNAL_OutputObject)
Returns whether this object is read-signalled
- BOOLEAN FUNCTION IsSignalled()
Returns whether this object is signalled (a message is present or the other endpoint has been closed).
- BOOLEAN FUNCTION IsWriteSignalled() (inherited from __HS_INTERNAL_OutputObject)
Returns whether this object is write-signalled
- RECORD FUNCTION ReceiveMessage(DATETIME wait_until)
Receives a message from the other endpoint
- RECORD FUNCTION SendExceptionReply(OBJECT e, INTEGER64 replyto)
Sends an exception reply to the other endpoint of the link
- RECORD FUNCTION SendMessage(RECORD message)
Sends a message to the other endpoint of the link
- RECORD FUNCTION SendReply(RECORD message, INTEGER64 replyto)
Sends a reply to another message to the other endpoint of the link
- BOOLEAN FUNCTION Wait(DATETIME until) (inherited from __HS_INTERNAL_OutputObject)
Waits until this output has become signalled (read or write)