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)
Man Page

11 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

queue is disabled

Does anyone know why I got this message when I tried to print my file on Unix? THANK YOU! (1 Reply)
Discussion started by: whatisthis
1 Replies

2. Solaris

Deffered messages

hi all . i am using messaging 4.2 . i have configured everything and i was able to send and receive emails . the problem is that the message queue is becoming large and full of deffered messages . i was told that i can not delete the messages because they are related to an envelope , and... (0 Replies)
Discussion started by: ppass
0 Replies

3. Programming

regarding socket & mssage queue

hello , I have to write an application in which I had to implement both Socket Comminication and IPC- message queues. and that process should run in Infinite loop as well I had to continously check and send data through both type of communications... What should I use to implement it... I had... (34 Replies)
Discussion started by: arunchaudhary19
34 Replies

4. UNIX for Dummies Questions & Answers

Sending a structure through a message queue

Hi, I browsed thru the previous posts and couldnt find a solution for my problem. Hence I decided to post it. I have a buffer array that I want to send thru a message queue. The array consists of a header structure and a payload structure memcopied to it. When I print the contents of the... (1 Reply)
Discussion started by: zeebie
1 Replies

5. AIX

How to display IPC limit on AIX?

Such as how to display these: number of message queue IDs : 4,096 bytes per message : 8,192 bytes per message queue : 65,536 messages per message queue : 8,192 (4 Replies)
Discussion started by: rainbow_bean
4 Replies

6. Programming

Number of bytes in terminal input queue w/o blocking and consuming?

Hello, everyone. Could someone, please, tell me how to get the number of bytes in the terminal input queue without blocking and without consuming these bytes? I guess it could be called the peek functionality. I've looked at termio tcgetattr() and tcsetattr() functions but could not find... (4 Replies)
Discussion started by: Lucy.Garfeld
4 Replies

7. Shell Programming and Scripting

Move xml files from unix to message queue.

Hi, I need to move the XML files from the UNIX to the message queue. Please help me out to write the code.. Thanks, Mohana Krishnan (0 Replies)
Discussion started by: krishnan_6015@y
0 Replies

8. Shell Programming and Scripting

print queue monitoring

Hi Guys, I am new to this forum. i need your help. I am trying to wirte a script for queue monitoring under aix.I would like to get status of each queue and number of jobs on each queue.Can you please guide me?. Thanks, Sag (3 Replies)
Discussion started by: shahbaz430
3 Replies

9. Programming

Message queue is not blocked in msgsnd

Hi, I am trying to send/receive data by message queue and expecting it to be blocked on send/read for other side (at least this is my understooding ) , I am connecting message between perl<->C , perl is working as expected , but in C msgsnd and msgrcv are not waiting (blocked) untill second side... (6 Replies)
Discussion started by: alexse
6 Replies

10. Programming

[Solved] how to send an integer via message queue?

how can i send an integer via message queue? i try this, but it doesn't work, child process receive 13345943 instead of 5 #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/msg.h> #include <sys/ipc.h> #include <sys/sem.h> #include <errno.h> #include <unistd.h>... (2 Replies)
Discussion started by: tafazzi87
2 Replies

11. Shell Programming and Scripting

PERL script loop problem

I have written the below PERL script to reprocess messages from a failure queue. It basically browses all the messages in the failure queue to individual files in a directory and then scans those files to determine the originating queue. The script will then move each message in turn from the... (0 Replies)
Discussion started by: chris01010
0 Replies