The OpenD Programming Language

mq_timedreceive

Receive the oldest message with the highest priority the message queue, wait up to a certain timeout.

version(Posix && CRuntime_Glibc)
extern (C) @nogc nothrow pragma(mangle, muslRedirTime64Mangle!("mq_timedreceive", "__mq_timedreceive_time64"))
ssize_t
mq_timedreceive
(,
char* msg_ptr
,
size_t msg_len
,
uint* msg_prio
,
const(timespec)* abs_timeout
)

Parameters

mqdes mqd_t

Message queue descriptor.

msg_ptr char*

Buffer to write the message to

msg_len size_t

Size of the buffer provided as msg_ptr. Must be greater than the mq_msgsize attribute of the queue.

msg_prio uint*

If not null, set to the priority of this message.

abs_timeout const(timespec)*

Specify a ceiling on the time to block if the queue is empty.

Return Value

Type: ssize_t

On success, mq_receive() returns the number of bytes in the received message; on error, -1 is returned, with errno set to indicate the error

Meta