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

  1.  
  2. <HTML>
  3. <HEAD>
  4. <TITLE>Net::DummyInetd - A dummy Inetd server</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> Net::DummyInetd - A dummy Inetd server</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="#constructor">CONSTRUCTOR</A></LI>
  26.     <LI><A HREF="#methods">METHODS</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>Net::DummyInetd - A dummy Inetd server</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. <LI>Windows</LI>
  43. </UL>
  44. <HR>
  45. <H1><A NAME="synopsis">SYNOPSIS</A></H1>
  46. <PRE>
  47.     use Net::DummyInetd;
  48.     use Net::SMTP;
  49. </PRE>
  50. <PRE>
  51.  
  52.     $inetd = new Net::DummyInetd qw(/usr/lib/sendmail -ba -bs);</PRE>
  53. <PRE>
  54.  
  55.     $smtp  = Net::SMTP->new('localhost', Port => $inetd->port);</PRE>
  56. <P>
  57. <HR>
  58. <H1><A NAME="description">DESCRIPTION</A></H1>
  59. <P><CODE>Net::DummyInetd</CODE> is just what it's name says, it is a dummy inetd server.
  60. Creation of a <CODE>Net::DummyInetd</CODE> will cause a child process to be spawned off
  61. which will listen to a socket. When a connection arrives on this socket
  62. the specified command is fork'd and exec'd with STDIN and STDOUT file
  63. descriptors duplicated to the new socket.</P>
  64. <P>This package was added as an example of how to use <CODE>Net::SMTP</CODE> to connect
  65. to a <CODE>sendmail</CODE> process, which is not the default, via SIDIN and STDOUT.
  66. A <CODE>Net::Inetd</CODE> package will be available in the next release of <CODE>libnet</CODE></P>
  67. <P>
  68. <HR>
  69. <H1><A NAME="constructor">CONSTRUCTOR</A></H1>
  70. <DL>
  71. <DT><STRONG><A NAME="item_new">new ( CMD )</A></STRONG><BR>
  72. <DD>
  73. Creates a new object and spawns a child process which listens to a socket.
  74. <CODE>CMD</CODE> is a list, which will be passed to <A HREF="../../../lib/Pod/perlfunc.html#item_exec"><CODE>exec</CODE></A> when a new process needs
  75. to be created.
  76. <P></P></DL>
  77. <P>
  78. <HR>
  79. <H1><A NAME="methods">METHODS</A></H1>
  80. <DL>
  81. <DT><STRONG><A NAME="item_port">port</A></STRONG><BR>
  82. <DD>
  83. Returns the port number on which the <EM>DummyInetd</EM> object is listening
  84. <P></P></DL>
  85. <P>
  86. <HR>
  87. <H1><A NAME="author">AUTHOR</A></H1>
  88. <P>Graham Barr <<A HREF="mailto:gbarr@pobox.com">gbarr@pobox.com</A>></P>
  89. <P>
  90. <HR>
  91. <H1><A NAME="copyright">COPYRIGHT</A></H1>
  92. <P>Copyright (c) 1995-1997 Graham Barr. All rights reserved.
  93. This program is free software; you can redistribute it and/or modify
  94. it under the same terms as Perl itself.</P>
  95. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
  96. <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
  97. <STRONG><P CLASS=block> Net::DummyInetd - A dummy Inetd server</P></STRONG>
  98. </TD></TR>
  99. </TABLE>
  100.  
  101. </BODY>
  102.  
  103. </HTML>
  104.