Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
POE::Watcher::Input(3)User Contributed Perl DocumentatioPOE::Watcher::Input(3)

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

SYNOPSIS
	       # 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);
		       ...;
	       }

DESCRIPTION
       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.

PUBLIC METHODS
   new handle => HANDLE, on_input => METHOD_NAME
       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.

BUGS
       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.

SEE ALSO
       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.

AUTHORS
       Rocco Caputo <rcaputo@cpan.org>.

LICENSE
       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.

perl v5.24.1			  2007-02-15		POE::Watcher::Input(3)

NAME | SYNOPSIS | DESCRIPTION | PUBLIC METHODS | BUGS | SEE ALSO | AUTHORS | LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=POE::Watcher::Input&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help