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
Protocol::HTTP2(3) User Contributed Perl Documentation Protocol::HTTP2(3)

Protocol::HTTP2 - HTTP/2 protocol implementation (RFC 7540)

    use Protocol::HTTP2;

    # get protocol identification string for secure connections
    print Protocol::HTTP2::ident_tls;           # h2

    # get protocol identification string for non-secure connections
    print Protocol::HTTP2::ident_plain;         # h2c

Protocol::HTTP2 is HTTP/2 protocol implementation (RFC 7540 <https://tools.ietf.org/html/rfc7540>) with stateful decoders/encoders of HTTP/2 frames. You may use this module to implement your own HTTP/2 client/server/intermediate on top of your favorite event loop over plain or tls socket (see examples).

Current status - beta. Structures, module names and methods seems like stable. I've started this project to understand internals of HTTP/2 and may be it will never become production, but at least it works.

    | Spec                    |      status     |
    | ----------------------- | --------------- |
    | Negotiation             |   ALPN, NPN,    |
    |                         | Upgrade, direct |
    | Preface                 |        +        |
    | Headers (de)compression |        +        |
    | Stream states           |        +        |
    | Flow control            |        X        |
    | Stream priority         |        X        |
    | Server push             |        +        |
    | Connect method          |        -        |


    | Frame           | encoder | decoder |
    | --------------- |:-------:|:-------:|
    | DATA            |    X    |    +    |
    | HEADERS         |    +    |    +    |
    | PRIORITY        |    +    |    +    |
    | RST_STREAM      |    +    |    +    |
    | SETTINGS        |    +    |    +    |
    | PUSH_PROMISE    |    +    |    +    |
    | PING            |    +    |    +    |
    | GOAWAY          |    +    |    +    |
    | WINDOW_UPDATE   |    +    |    +    |
    | CONTINUATION    |    X    |    +    |
- -- not implemeted
X -- incomplete
+ -- implemented (may even work)

Client protocol decoder/encoder with constructor of requests

Server protocol decoder/encoder with constructor of responses/pushes

Main low level module for protocol logic and state processing. Connection object is a mixin of Protocol::HTTP2::Frame (frame encoding/decoding), Protocol::HTTP2::Stream (stream operations) and Protocol::HTTP2::Upgrade (HTTP/1.1 Upgrade support)

Module implements HPACK - Header Compression for HTTP/2 (RFC 7541 <https://tools.ietf.org/html/rfc7541>).

Module contains all defined in HTTP/2 protocol constants and default values

Module for debugging. You can setup HTTP2_DEBUG environment variable to change verbosity of the module (output to STDOUT). Default level is error.

    $ export HTTP2_DEBUG=debug
    $ perl ./http2_program

<https://github.com/vlet/p5-Protocol-HTTP2/wiki> - Protocol::HTTP2 wiki

<http://http2.github.io/> - official HTTP/2 specification site

<http://daniel.haxx.se/http2/> - http2 explained

Copyright (C) Vladimir Lettiev.

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

Vladimir Lettiev <thecrux@gmail.com>
2019-11-12 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.