The OpenD Programming Language

mq_receive

Receive the oldest message with the highest priority the message queue

version(Posix && CRuntime_Glibc)
extern (C) @nogc nothrow
ssize_t
mq_receive
(,
char* msg_ptr
,
size_t msg_len
,
uint* msg_prio
)

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.

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