GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
POE::Watcher::Input(3) User Contributed Perl Documentation POE::Watcher::Input(3)

POE::Watcher::Input - watch a socket or other handle for input readiness

        # Note, this is not a complete program.
        # See the distribution's examples directory.

        sub some_other :Handler {
                # Request a delay notification.
                my $req_socket = $socket_handle;
                my $req_input  = POE::Watcher::Input->new(
                        handle    => $req_socket,
                        on_input  => "read_from_socket",
                        args      => \%passed_to_callbacks,
                );
        }

        # Handle the delay notification.
        sub read_from_socket {
                my $req_socket;
                my $octets = sysread($req_socket, my $buf = "", 65536);
                ...;
        }

POE::Watcher::Input watches a socket or other handle and delivers a message whenever the handle becomes ready to be read. Both the handle and the method to call are passed to POE::Watcher::Input objects at construction time.

Construct a new POE::Watcher::Input object. The constructor takes two parameters: "handle" is the socket or other file handle to watch for input readiness. "on_input" is the name of the method in the current Stage to invoke when the handle is ready to be read from.

Destroy this object to cancel it.

See <http://thirdlobe.com/projects/poe-stage/report/1> for known issues. See <http://thirdlobe.com/projects/poe-stage/newticket> to report one.

POE::Stage is too young for production use. For example, its syntax is still changing. You probably know what you don't like, or what you need that isn't included, so consider fixing or adding that, or at least discussing it with the people on POE's mailing list or IRC channel. Your feedback and contributions will bring POE::Stage closer to usability. We appreciate it.

POE::Watcher describes concepts that are common to all POE::Watcher classes. It's required reading in order to understand fully what's going on.

Rocco Caputo <rcaputo@cpan.org>.

POE::Watcher::Input is Copyright 2005-2006 by Rocco Caputo. All rights are reserved. You may use, modify, and/or distribute this module under the same terms as Perl itself.
2007-02-15 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.