1POE::Driver(3)        User Contributed Perl Documentation       POE::Driver(3)
2
3
4

NAME

6       POE::Driver - an abstract file driver
7

SYNOPSIS

9         $driver = POE::Driver::Something->new();
10         $arrayref_of_data_chunks = $driver->get($filehandle);
11         $queue_octets = $driver->put($arrayref_of_data_chunks);
12         $queue_octets = $driver->flush($filehandle);
13         $queue_messages = $driver->get_out_messages_buffered();
14

DESCRIPTION

16       Drivers implement generic interfaces to low-level file I/O.  Wheels use
17       them to read and write files, sockets, and other things without needing
18       to know the details for doing so.
19

PUBLIC DRIVER METHODS

21       These methods are the generic Driver interface, and every driver must
22       implement them.  Specific drivers may have additional methods.
23
24       new
25         new() creates and initializes a new driver.  Specific drivers may
26         have different constructor parameters.
27
28       get FILEHANDLE
29         get() immediately tries to read information from a filehandle.  It
30         returns a reference to an array containing whatever it managed to
31         read, or an empty array if nothing could be read.  It returns undef
32         on error, and $! will be set.
33
34         The arrayref get() returns is suitable for passing to any POE::Fil‐
35         ter's get() method.  This is exactly what the ReadWrite wheel does
36         with it.
37
38       put ARRAYREF
39         put() places raw data chunks into the driver's output queue.  it
40         accepts a reference to a list of raw data chunks, and it returns the
41         number of octets remaining in its output queue.
42
43         Some drivers may flush data immediately from their put() methods.
44
45       flush FILEHANDLE
46         flush() attempts to flush some data from the driver's output queue to
47         the FILEHANDLE.  It returns the number of octets remaining in the
48         output queue after the flush attempt.
49
50         flush() does the physical write, counterpoint to get's read.  If
51         flush() fails for any reason, $! will be set with the reason for its
52         failure.  Otherwise $! will be zero.
53
54       get_out_messages_buffered
55         This data accessor returns the number of messages in the driver's
56         output queue.  Partial messages are counted as whole ones.
57

SEE ALSO

59       The SEE ALSO section in POE contains a table of contents covering the
60       entire POE distribution.
61

BUGS

63       There is no POE::Driver::SendRecv, but nobody has needed one so far.
64
65       In theory, drivers should be pretty much interchangeable.  In practice,
66       there seems to be an impermeable barrier between the different SOCK_*
67       types.
68

AUTHORS & COPYRIGHTS

70       Please see POE for more information about authors and contributors.
71
72
73
74perl v5.8.8                       2006-09-01                    POE::Driver(3)
Impressum