Install Perl 5.8.8
[msysgit.git] / mingw / html / ext / IPC / SysV / Msg.html
bloba3974cd5d2295d3348056a49748b118c9955e75a
1 <?xml version="1.0" ?>
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">
4 <head>
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:" />
8 </head>
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">&nbsp;IPC::Msg - SysV Msg IPC object class</span></strong></big>
14 </td></tr>
15 </table>
17 <p><a name="__index__"></a></p>
18 <!-- INDEX BEGIN -->
20 <ul>
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>
29 </ul>
30 <!-- INDEX END -->
32 <hr />
33 <p>
34 </p>
35 <h1><a name="name">NAME</a></h1>
36 <p>IPC::Msg - SysV Msg IPC object class</p>
37 <p>
38 </p>
39 <hr />
40 <h1><a name="synopsis">SYNOPSIS</a></h1>
41 <pre>
42 use IPC::SysV qw(IPC_PRIVATE S_IRWXU);
43 use IPC::Msg;</pre>
44 <pre>
45 $msg = new IPC::Msg(IPC_PRIVATE, S_IRWXU);</pre>
46 <pre>
47 $msg-&gt;snd(pack(&quot;l! a*&quot;,$msgtype,$msg));</pre>
48 <pre>
49 $msg-&gt;rcv($buf,256);</pre>
50 <pre>
51 $ds = $msg-&gt;stat;</pre>
52 <pre>
53 $msg-&gt;remove;</pre>
54 <p>
55 </p>
56 <hr />
57 <h1><a name="description">DESCRIPTION</a></h1>
58 <p>A class providing an object based interface to SysV IPC message queues.</p>
59 <p>
60 </p>
61 <hr />
62 <h1><a name="methods">METHODS</a></h1>
63 <dl>
64 <dt><strong><a name="item_new">new ( KEY , FLAGS )</a></strong>
66 <dd>
67 <p>Creates a new message queue associated with <code>KEY</code>. A new queue is
68 created if</p>
69 </dd>
70 <ul>
71 <li>
72 <p><code>KEY</code> is equal to <code>IPC_PRIVATE</code></p>
73 </li>
74 <li>
75 <p><code>KEY</code> does not already have a message queue
76 associated with it, and <code>FLAGS &amp; IPC_CREAT</code> is true.</p>
77 </li>
78 </ul>
79 <p>On creation of a new message queue <code>FLAGS</code> is used to set the
80 permissions.</p>
81 <dt><strong><a name="item_id">id</a></strong>
83 <dd>
84 <p>Returns the system message queue identifier.</p>
85 </dd>
86 </li>
87 <dt><strong><a name="item_rcv">rcv ( BUF, LEN [, TYPE [, FLAGS ]] )</a></strong>
89 <dd>
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>
92 </dd>
93 </li>
94 <dt><strong><a name="item_remove">remove</a></strong>
96 <dd>
97 <p>Remove and destroy the message queue from the system.</p>
98 </dd>
99 </li>
100 <dt><strong><a name="item_set">set ( STAT )</a></strong>
102 <dt><strong>set ( NAME =&gt; VALUE [, NAME =&gt; VALUE ...] )</strong>
104 <dd>
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>
107 </dd>
108 <dd>
109 <pre>
112 mode (oly the permission bits)
113 qbytes</pre>
114 </dd>
115 <dd>
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>
118 </dd>
119 </li>
120 <dt><strong><a name="item_snd">snd ( TYPE, MSG [, FLAGS ] )</a></strong>
122 <dd>
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>
125 </dd>
126 </li>
127 <dt><strong><a name="item_stat">stat</a></strong>
129 <dd>
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>
133 </dd>
134 <dd>
135 <pre>
138 cuid
139 cgid
140 mode
141 qnum
142 qbytes
143 lspid
144 lrpid
145 stime
146 rtime
147 ctime</pre>
148 </dd>
149 </li>
150 </dl>
152 </p>
153 <hr />
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>
157 </p>
158 <hr />
159 <h1><a name="author">AUTHOR</a></h1>
160 <p>Graham Barr &lt;<a href="mailto:gbarr@pobox.com">gbarr@pobox.com</a>&gt;</p>
162 </p>
163 <hr />
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">&nbsp;IPC::Msg - SysV Msg IPC object class</span></strong></big>
171 </td></tr>
172 </table>
174 </body>
176 </html>