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.

new

$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.

id

$msg->id

Returns the system identifier for the message queue.

rcv

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

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

remove

$msg->remove

Removes and destroys the message queue.

set

$msg->set(stat)
$msg->set(name=>value[,name=>value...])

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:

uid
gid
mode (the permission bits)
qbytes
snd

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

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

stat

$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.