2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml">
5 <title>IPC::Msg - SysV Msg IPC object class
</title>
6 <meta http-equiv=
"content-type" content=
"text/html; charset=utf-8" />
7 <link rev=
"made" href=
"mailto:" />
10 <body style=
"background-color: white">
11 <table border=
"0" width=
"100%" cellspacing=
"0" cellpadding=
"3">
12 <tr><td class=
"block" style=
"background-color: #cccccc" valign=
"middle">
13 <big><strong><span class=
"block"> IPC::Msg - SysV Msg IPC object class
</span></strong></big>
17 <p><a name=
"__index__"></a></p>
22 <li><a href=
"#name">NAME
</a></li>
23 <li><a href=
"#synopsis">SYNOPSIS
</a></li>
24 <li><a href=
"#description">DESCRIPTION
</a></li>
25 <li><a href=
"#methods">METHODS
</a></li>
26 <li><a href=
"#see_also">SEE ALSO
</a></li>
27 <li><a href=
"#author">AUTHOR
</a></li>
28 <li><a href=
"#copyright">COPYRIGHT
</a></li>
35 <h1><a name=
"name">NAME
</a></h1>
36 <p>IPC::Msg - SysV Msg IPC object class
</p>
40 <h1><a name=
"synopsis">SYNOPSIS
</a></h1>
42 use IPC::SysV qw(IPC_PRIVATE S_IRWXU);
45 $msg = new IPC::Msg(IPC_PRIVATE, S_IRWXU);
</pre>
47 $msg-
>snd(pack(
"l! a*
",$msgtype,$msg));
</pre>
49 $msg-
>rcv($buf,
256);
</pre>
51 $ds = $msg-
>stat;
</pre>
53 $msg-
>remove;
</pre>
57 <h1><a name=
"description">DESCRIPTION
</a></h1>
58 <p>A class providing an object based interface to SysV IPC message queues.
</p>
62 <h1><a name=
"methods">METHODS
</a></h1>
64 <dt><strong><a name=
"item_new">new ( KEY , FLAGS )
</a></strong>
67 <p>Creates a new message queue associated with
<code>KEY
</code>. A new queue is
72 <p><code>KEY
</code> is equal to
<code>IPC_PRIVATE
</code></p>
75 <p><code>KEY
</code> does not already have a message queue
76 associated with it, and
<code>FLAGS
& IPC_CREAT
</code> is true.
</p>
79 <p>On creation of a new message queue
<code>FLAGS
</code> is used to set the
81 <dt><strong><a name=
"item_id">id
</a></strong>
84 <p>Returns the system message queue identifier.
</p>
87 <dt><strong><a name=
"item_rcv">rcv ( BUF, LEN [, TYPE [, FLAGS ]] )
</a></strong>
90 <p>Read a message from the queue. Returns the type of the message read.
91 See
<em>msgrcv
</em>. The BUF becomes tainted.
</p>
94 <dt><strong><a name=
"item_remove">remove
</a></strong>
97 <p>Remove and destroy the message queue from the system.
</p>
100 <dt><strong><a name=
"item_set">set ( STAT )
</a></strong>
102 <dt><strong>set ( NAME =
> VALUE [, NAME =
> VALUE ...] )
</strong>
105 <p><a href=
"#item_set"><code>set
</code></a> will set the following values of the
<a href=
"#item_stat"><code>stat
</code></a> structure associated
106 with the message queue.
</p>
112 mode (oly the permission bits)
116 <p><a href=
"#item_set"><code>set
</code></a> accepts either a stat object, as returned by the
<a href=
"#item_stat"><code>stat
</code></a> method,
117 or a list of
<em>name
</em>-
<em>value
</em> pairs.
</p>
120 <dt><strong><a name=
"item_snd">snd ( TYPE, MSG [, FLAGS ] )
</a></strong>
123 <p>Place a message on the queue with the data from
<code>MSG
</code> and with type
<code>TYPE
</code>.
124 See
<em>msgsnd
</em>.
</p>
127 <dt><strong><a name=
"item_stat">stat
</a></strong>
130 <p>Returns an object of type
<code>IPC::Msg::stat
</code> which is a sub-class of
131 <code>Class::Struct
</code>. It provides the following fields. For a description
132 of these fields see you system documentation.
</p>
154 <h1><a name=
"see_also">SEE ALSO
</a></h1>
155 <p><a href=
"file://C|\msysgit\mingw\html/IPC/SysV.html">the IPC::SysV manpage
</a> <a href=
"file://C|\msysgit\mingw\html/lib/Class/Struct.html">the Class::Struct manpage
</a></p>
159 <h1><a name=
"author">AUTHOR
</a></h1>
160 <p>Graham Barr
<<a href=
"mailto:gbarr@pobox.com">gbarr@pobox.com
</a>></p>
164 <h1><a name=
"copyright">COPYRIGHT
</a></h1>
165 <p>Copyright (c)
1997 Graham Barr. All rights reserved.
166 This program is free software; you can redistribute it and/or modify it
167 under the same terms as Perl itself.
</p>
168 <table border=
"0" width=
"100%" cellspacing=
"0" cellpadding=
"3">
169 <tr><td class=
"block" style=
"background-color: #cccccc" valign=
"middle">
170 <big><strong><span class=
"block"> IPC::Msg - SysV Msg IPC object class
</span></strong></big>