home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

Book HomeJava and XSLTSearch this book

8.133. IPC::Msg

System V Msg IPC object class. Uses constants defined in IPC::SysV.


$msg = new IPC::Msg(key, flags)

Creates a new message queue associated with key and uses flags to set the permissions. Creates the new message queue if the following are true:

  • key is equal to IPC_PRIVATE.

  • key doesn't already have an associated message queue, and FLAGS & IPC_CREAT is true.



Returns the system identifier for the message queue.


$msg->rcv(buf, len[, type[, flags]])

Reads a message from the queue, returning the type of the message.



Removes and destroys the message queue.



Accepts either a stat object as returned by the stat method or a list of name/value pairs and sets the following values of the stat structure associated with the message queue:

mode (the permission bits)

$msg->snd(type, msg[, flags])

Puts a message of type type on the queue with the data from msg. See the msgsnd function.


$ds = $msg->stat

Returns an object of type IPC::Msg::stat (which is a subclass of Class::Struct) that provides the following fields:

uid    gid    cuid    cgid
mode   qnum   qbytes  lspid
lrpid  stime  rtime   ctime

See the stat function and your system documentation for more information.

Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.