home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 May
/
Chip_2000-05_cd1.bin
/
zkuste
/
Perl
/
ActivePerl-5.6.0.613.msi
/
䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥
/
_41f1c4760f4e889f2a42c1b46ce26ea5
< prev
next >
Wrap
Text File
|
2000-03-23
|
4KB
|
115 lines
<HTML>
<HEAD>
<TITLE>POE::Driver - POE Read/Write Abstraction</TITLE>
<LINK REL="stylesheet" HREF="../../../Active.css" TYPE="text/css">
<LINK REV="made" HREF="mailto:">
</HEAD>
<BODY>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<STRONG><P CLASS=block> POE::Driver - POE Read/Write Abstraction</P></STRONG>
</TD></TR>
</TABLE>
<A NAME="__index__"></A>
<!-- INDEX BEGIN -->
<UL>
<LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
<LI><A HREF="#synopsis">SYNOPSIS</A></LI>
<LI><A HREF="#description">DESCRIPTION</A></LI>
<LI><A HREF="#public driver methods">PUBLIC DRIVER METHODS</A></LI>
<LI><A HREF="#see also">SEE ALSO</A></LI>
<LI><A HREF="#bugs">BUGS</A></LI>
<LI><A HREF="#authors & copyrights">AUTHORS & COPYRIGHTS</A></LI>
</UL>
<!-- INDEX END -->
<HR>
<P>
<H1><A NAME="name">NAME</A></H1>
<P>POE::Driver - POE Read/Write Abstraction</P>
<P>
<HR>
<H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
<UL>
<LI>Linux</LI>
<LI>Solaris</LI>
<LI>Windows</LI>
</UL>
<HR>
<H1><A NAME="synopsis">SYNOPSIS</A></H1>
<PRE>
$driver = new POE::Driver::Something();
$arrayref_of_data_chunks = $driver->get($filehandle);
$queue_size = $driver->put($arrayref_of_data_chunks);
$queue_size = $driver->flush($filehandle);</PRE>
<P>
<HR>
<H1><A NAME="description">DESCRIPTION</A></H1>
<P>Drivers provide a generic interface for low-level file I/O. Wheels
use this interface to read and write files, sockets, and things,
without having to know the details for each.</P>
<P>In theory, drivers should be pretty much interchangeable. In
practice, there seems to be an impermeable barrier between the
different SOCK_* types.</P>
<P>
<HR>
<H1><A NAME="public driver methods">PUBLIC DRIVER METHODS</A></H1>
<P>These methods are the generic Driver interface. Specific drivers may
have additional methods.</P>
<UL>
<LI>
POE::Driver::new()
<P>The <CODE>new()</CODE> method creates and initializes a new driver. Specific
drivers may have different constructor parameters.</P>
<P></P>
<LI>
POE::Driver::get($filehandle)
<P>The <CODE>get()</CODE> method immediately tries to read information from a
filehandle. It returns a reference to an array of received data
chunks. The array may be empty if nothing could be read. The array
reference it returns is a suitable parameter to POE::Filter::get().</P>
<P>Wheels usually call the <CODE>get()</CODE> method from their read select states.</P>
<P></P>
<LI>
POE::Driver::put($arrayref_of_data_chunks)
<P>The <CODE>put()</CODE> method places raw data into the driver's output queue. Some
drivers may flush data from the <CODE>put()</CODE> method. It accepts a reference
to an array of writable chunks, and it returns the number of elements
it its output queue.</P>
<P>Wheels usually call the <CODE>put()</CODE> method from their own <CODE>put()</CODE> methods.</P>
<P></P>
<LI>
POE::Driver::flush($filehandle)
<P>The <CODE>flush()</CODE> method attempts to flush some data from the driver's
output queue to the file. It returns the number of elements remaining
in the output queue after the flush.</P>
<P>Wheels usually call the <CODE>flush()</CODE> method from their write select states.</P>
<P></P></UL>
<P>
<HR>
<H1><A NAME="see also">SEE ALSO</A></H1>
<P>POE::Driver::SysRW</P>
<P>
<HR>
<H1><A NAME="bugs">BUGS</A></H1>
<P>There is no POE::Driver::SendRecv</P>
<P>
<HR>
<H1><A NAME="authors & copyrights">AUTHORS & COPYRIGHTS</A></H1>
<P>Please see the POE manpage.</P>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<STRONG><P CLASS=block> POE::Driver - POE Read/Write Abstraction</P></STRONG>
</TD></TR>
</TABLE>
</BODY>
</HTML>