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

FreeBSD Manual Pages

  
 
  

home | help
AnyEvent::ReverseHTTP(User Contributed Perl DocumentatAnyEvent::ReverseHTTP(3)

NAME
       AnyEvent::ReverseHTTP - reversehttp for AnyEvent

SYNOPSIS
	 use AnyEvent::ReverseHTTP;

	 # simple Hello	World server
	 my $guard = reverse_http "myserver123", "token", sub {
	     my	$req = shift;
	     return "Hello World"; # You can return HTTP::Response object for more control
	 };

	 # more	controls over options and callbacks
	 my $server = AnyEvent::ReverseHTTP->new(
	     endpoint => "http://www.reversehttp.net/reversehttp",
	     label    => "aedemo1234",
	     token    => "mytoken",
	 );

	 $server->on_register(sub {
	     my	$pub_url = shift;
	 });

	 $server->on_request(sub {
	     my	$req = shift;
	     # $req is HTTP::Request, return HTTP::Response or AnyEvent::CondVar that receives it
	 });

	 my $guard = $server->connect;

	 AnyEvent->condvar->recv;

DESCRIPTION
       AnyEvent::ReverseHTTP is	an AnyEvent module that	acts as	a Reverse HTTP
       server (which is	actually a polling client for Reverse HTTP gateway).

       This module implements simple Reverse HTTP client that's	tested against
       reversehttp.net demo server. More complicated specification like
       relaying	or pipelining is not (yet) implemented.

AUTHOR
       Tatsuhiko Miyagawa <miyagawa@bulknews.net>

LICENSE
       This library is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

SEE ALSO
       <http://www.reversehttp.net/reverse-http-spec.html>

perl v5.32.0			  2009-08-05	      AnyEvent::ReverseHTTP(3)

NAME | SYNOPSIS | DESCRIPTION | AUTHOR | LICENSE | SEE ALSO

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

home | help