Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

msg_send(3) [php man page]

MSG_SEND(3)								 1							       MSG_SEND(3)

msg_send - Send a message to a message queue

SYNOPSIS
bool msg_send (resource $queue, int $msgtype, mixed $message, [bool $serialize = true], [bool $blocking = true], [int &$errorcode]) DESCRIPTION
msg_send(3) sends a $message of type $msgtype (which MUST be greater than 0) to the message queue specified by $queue. PARAMETERS
o $queue - o $msgtype - o $message - o $serialize - The optional $serialize controls how the $message is sent. $serialize defaults to TRUE which means that the $message is serial- ized using the same mechanism as the session module before being sent to the queue. This allows complex arrays and objects to be sent to other PHP scripts, or if you are using the WDDX serializer, to any WDDX compatible client. o $blocking - If the message is too large to fit in the queue, your script will wait until another process reads messages from the queue and frees enough space for your message to be sent. This is called blocking; you can prevent blocking by setting the optional $block- ing parameter to FALSE, in which case msg_send(3) will immediately return FALSE if the message is too big for the queue, and set the optional $errorcode to MSG_EAGAIN, indicating that you should try to send your message again a little later on. o $errorcode - RETURN VALUES
Returns TRUE on success or FALSE on failure. Upon successful completion the message queue data structure is updated as follows: $msg_lspid is set to the process-ID of the calling process, $msg_qnum is incremented by 1 and $msg_stime is set to the current time. SEE ALSO
msg_remove_queue(3), msg_receive(3), msg_stat_queue(3), msg_set_queue(3). PHP Documentation Group MSG_SEND(3)

Check Out this Related Man Page

mq_send(2)							System Calls Manual							mq_send(2)

NAME
mq_send - send a message to a message queue SYNOPSIS
DESCRIPTION
The system call adds a message pointed to by the argument msg_ptr to the message queue specified by mqdes. The msg_len argument specifies the length of the message in bytes. The value of msg_len should be less than or equal to the mq_msgsize attribute of the message queue, or will fail. If the specified message queue is not full, will insert the message into the queue at the position indicated by the msg_prio argument. A message with priority, msg_prio, will be inserted behind any other messages with larger or equal priority. The value of msg_prio should be less than If the specified message queue is full and the flag is not set in the message queue blocking status associated with mqdes, will block in priority order, until it can send a message on the queue, or until is interrupted by a signal. If the specified message queue is full and the flag is set in the message queue blocking status associated with mqdes, the message will not be enqueued, and will return with an error. To use this function, link in the realtime library by specifying on the compiler or linker command line. RETURN VALUE
returns the following values: Successful completion. The message is enqueued. Failure. is set to indicate the error and the message is not enqueued. ERRORS
If fails, is set to one of the following values: [EAGAIN] The flag is set in the message queue blocking status associated with mqdes, and the message queue is full. [EBADF] mqdes is not a valid message queue descriptor open for writing. [EINTR] A signal interrupted the call to [EINVAL] msg_ptr points to an invalid address, or the value of msg_prio is outside the valid range. [EMSGSIZE] The specified message length, msg_len, exceeds the message size attribute of the message queue. [ENOSYS] is not supported by the implementation. SEE ALSO
mq_receive(2), mq_setattr(2), mq_getattr(2), sysconf(2). STANDARDS CONFORMANCE
mq_send(2)
Man Page