Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

msg_remove_queue(3) [php man page]

MSG_REMOVE_QUEUE(3)							 1						       MSG_REMOVE_QUEUE(3)

msg_remove_queue - Destroy a message queue

SYNOPSIS
bool msg_remove_queue (resource $queue) DESCRIPTION
msg_remove_queue(3) destroys the message queue specified by the $queue. Only use this function when all processes have finished working with the message queue and you need to release the system resources held by it. PARAMETERS
o $queue - Message queue resource handle RETURN VALUES
Returns TRUE on success or FALSE on failure. SEE ALSO
msg_get_queue(3), msg_receive(3), msg_stat_queue(3), msg_set_queue(3). PHP Documentation Group MSG_REMOVE_QUEUE(3)

Check Out this Related Man Page

MSG_RECEIVE(3)								 1							    MSG_RECEIVE(3)

msg_receive - Receive a message from a message queue

SYNOPSIS
bool msg_receive (resource $queue, int $desiredmsgtype, int &$msgtype, int $maxsize, mixed &$message, [bool $unserialize = true], [int $flags], [int &$errorcode]) DESCRIPTION
msg_receive(3) will receive the first message from the specified $queue of the type specified by $desiredmsgtype. PARAMETERS
o $queue - o $desiredmsgtype - If $desiredmsgtype is 0, the message from the front of the queue is returned. If $desiredmsgtype is greater than 0, then the first message of that type is returned. If $desiredmsgtype is less than 0, the first message on the queue with the lowest type less than or equal to the absolute value of $desiredmsgtype will be read. If no messages match the criteria, your script will wait until a suitable message arrives on the queue. You can prevent the script from blocking by specifying MSG_IPC_NOWAIT in the $flags parameter. o $msgtype - The type of the message that was received will be stored in this parameter. o $maxsize - The maximum size of message to be accepted is specified by the $maxsize; if the message in the queue is larger than this size the function will fail (unless you set $flags as described below). o $message - The received message will be stored in $message, unless there were errors receiving the message. o $unserialize - If set to TRUE, the message is treated as though it was serialized using the same mechanism as the session module. The message will be unserialized and then returned to your script. This allows you to easily receive arrays or complex object structures from other PHP scripts, or if you are using the WDDX serializer, from any WDDX compatible source. If $unserialize is FALSE, the mes- sage will be returned as a binary-safe string. o $flags - The optional $flags allows you to pass flags to the low-level msgrcv system call. It defaults to 0, but you may specify one or more of the following values (by adding or ORing them together). Flag values for msg_receive +---------------+---------------------------------------------------+ | | | |MSG_IPC_NOWAIT | | | | | | | If there are no messages of the $desiredmsgtype, | | | return immediately and do not wait. The function | | | will fail and return an integer value correspond- | | | ing to MSG_ENOMSG. | | | | | | | | MSG_EXCEPT | | | | | | | Using this flag in combination with a $desiredms- | | | gtype greater than 0 will cause the function to | | | receive the first message that is not equal to | | | $desiredmsgtype. | | | | | | | | MSG_NOERROR | | | | | | | If the message is longer than $maxsize, setting | | | this flag will truncate the message to $maxsize | | | and will not signal an error. | | | | +---------------+---------------------------------------------------+ o $errorcode - If the function fails, the optional $errorcode will be set to the value of the system errno variable. RETURN VALUES
Returns TRUE on success or FALSE on failure. Upon successful completion the message queue data structure is updated as follows: msg_lrpid is set to the process-ID of the calling process, msg_qnum is decremented by 1 and msg_rtime is set to the current time. SEE ALSO
msg_remove_queue(3), msg_send(3), msg_stat_queue(3), msg_set_queue(3). PHP Documentation Group MSG_RECEIVE(3)
Man Page