home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd1.bin / zkuste / Perl / ActivePerl-5.6.0.613.msi / 䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥 / _1d5ad0776987aa378c909de52c682214 < prev    next >
Encoding:
Text File  |  2000-03-23  |  4.5 KB  |  153 lines

  1.  
  2. <HTML>
  3. <HEAD>
  4. <TITLE>IPC::Msg - SysV Msg IPC object class</TITLE>
  5. <LINK REL="stylesheet" HREF="../../Active.css" TYPE="text/css">
  6. <LINK REV="made" HREF="mailto:">
  7. </HEAD>
  8.  
  9. <BODY>
  10. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  11. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  12. <STRONG><P CLASS=block> IPC::Msg - SysV Msg IPC object class</P></STRONG>
  13. </TD></TR>
  14. </TABLE>
  15.  
  16. <A NAME="__index__"></A>
  17. <!-- INDEX BEGIN -->
  18.  
  19. <UL>
  20.  
  21.     <LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
  22.  
  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 -->
  31.  
  32. <HR>
  33. <P>
  34. <H1><A NAME="name">NAME</A></H1>
  35. <P>IPC::Msg - SysV Msg IPC object class</P>
  36. <P>
  37. <HR>
  38. <H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
  39. <UL>
  40. <LI>Linux</LI>
  41. <LI>Solaris</LI>
  42. </UL>
  43. <HR>
  44. <H1><A NAME="synopsis">SYNOPSIS</A></H1>
  45. <PRE>
  46.     use IPC::SysV qw(IPC_PRIVATE S_IRWXU);
  47.     use IPC::Msg;</PRE>
  48. <PRE>
  49.     $msg = new IPC::Msg(IPC_PRIVATE, S_IRWXU);</PRE>
  50. <PRE>
  51.     $msg->snd(pack("l! a*",$msgtype,$msg));</PRE>
  52. <PRE>
  53.     $msg->rcv($buf,256);</PRE>
  54. <PRE>
  55.     $ds = $msg->stat;</PRE>
  56. <PRE>
  57.     $msg->remove;</PRE>
  58. <P>
  59. <HR>
  60. <H1><A NAME="description">DESCRIPTION</A></H1>
  61. <P>
  62. <HR>
  63. <H1><A NAME="methods">METHODS</A></H1>
  64. <DL>
  65. <DT><STRONG><A NAME="item_new">new ( KEY , FLAGS )</A></STRONG><BR>
  66. <DD>
  67. Creates a new message queue associated with <CODE>KEY</CODE>. A new queue is
  68. created if
  69. <UL>
  70. <LI>
  71. <CODE>KEY</CODE> is equal to <CODE>IPC_PRIVATE</CODE>
  72. <P></P>
  73. <LI>
  74. <CODE>KEY</CODE> does not already  have  a  message queue
  75. associated with it, and <CODE>FLAGS & IPC_CREAT</CODE> is true.
  76. <P></P></UL>
  77. <P>On creation of a new message queue <CODE>FLAGS</CODE> is used to set the
  78. permissions.</P>
  79. <DT><STRONG><A NAME="item_id">id</A></STRONG><BR>
  80. <DD>
  81. Returns the system message queue identifier.
  82. <P></P>
  83. <DT><STRONG><A NAME="item_rcv">rcv ( BUF, LEN [, TYPE [, FLAGS ]] )</A></STRONG><BR>
  84. <DD>
  85. Read a message from the queue. Returns the type of the message read.
  86. See <A HREF="../../lib/Pod/perlfunc.html#item_msgrcv">msgrcv</A>.  The  BUF becomes tainted.
  87. <P></P>
  88. <DT><STRONG><A NAME="item_remove">remove</A></STRONG><BR>
  89. <DD>
  90. Remove and destroy the message queue from the system.
  91. <P></P>
  92. <DT><STRONG><A NAME="item_set">set ( STAT )</A></STRONG><BR>
  93. <DD>
  94. <DT><STRONG>set ( NAME => VALUE [, NAME => VALUE ...] )</STRONG><BR>
  95. <DD>
  96. <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
  97. with the message queue.
  98. <PRE>
  99.     uid
  100.     gid
  101.     mode (oly the permission bits)
  102.     qbytes</PRE>
  103. <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,
  104. or a list of <EM>name</EM>-<EM>value</EM> pairs.</P>
  105. <P></P>
  106. <DT><STRONG><A NAME="item_snd">snd ( TYPE, MSG [, FLAGS ] )</A></STRONG><BR>
  107. <DD>
  108. Place a message on the queue with the data from <CODE>MSG</CODE> and with type <CODE>TYPE</CODE>.
  109. See <A HREF="../../lib/Pod/perlfunc.html#item_msgsnd">msgsnd</A>.
  110. <P></P>
  111. <DT><STRONG><A NAME="item_stat">stat</A></STRONG><BR>
  112. <DD>
  113. Returns an object of type <CODE>IPC::Msg::stat</CODE> which is a sub-class of
  114. <CODE>Class::Struct</CODE>. It provides the following fields. For a description
  115. of these fields see you system documentation.
  116. <PRE>
  117.     uid
  118.     gid
  119.     cuid
  120.     cgid
  121.     mode
  122.     qnum
  123.     qbytes
  124.     lspid
  125.     lrpid
  126.     stime
  127.     rtime
  128.     ctime</PRE>
  129. <P></P></DL>
  130. <P>
  131. <HR>
  132. <H1><A NAME="see also">SEE ALSO</A></H1>
  133. <P><A HREF="../../lib/IPC/SysV.html">the IPC::SysV manpage</A> <A HREF="../../lib/Class/Struct.html">the Class::Struct manpage</A></P>
  134. <P>
  135. <HR>
  136. <H1><A NAME="author">AUTHOR</A></H1>
  137. <P>Graham Barr <<A HREF="mailto:gbarr@pobox.com">gbarr@pobox.com</A>></P>
  138. <P>
  139. <HR>
  140. <H1><A NAME="copyright">COPYRIGHT</A></H1>
  141. <P>Copyright (c) 1997 Graham Barr. All rights reserved.
  142. This program is free software; you can redistribute it and/or modify it
  143. under the same terms as Perl itself.</P>
  144. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  145. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  146. <STRONG><P CLASS=block> IPC::Msg - SysV Msg IPC object class</P></STRONG>
  147. </TD></TR>
  148. </TABLE>
  149.  
  150. </BODY>
  151.  
  152. </HTML>
  153.