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
Net::SPDY::Session(3) User Contributed Perl Documentation Net::SPDY::Session(3)

Net::SPDY::Session - Handle SPDY protocol connection

Please read carefully: This is an ALPHA stage software. In particular this means that even though it probably won't kill your cat, re-elect George W. Bush nor install Solaris 11 Express edition to your hard drive, it is in active development, functionality is missing and no APIs are stable.

See TODO file in the distribution to learn about missing and planned functionality. You are more than welcome to join the development and submit patches with fixes or enhancements. Bug reports are probably not very useful at this point.

  use Net::SPDY::Session;

  my $server = new IO::Socket::SSL (
      LocalAddr => 'localhost:443',
      ReuseAddr => 1,
      SSL_server => 1,
      SSL_cert_file => $cert,
      SSL_key_file => $key,
      SSL_npn_protocols => ['spdy/3'])
      or die IO::Socket::SSL::errstr;

  while (my $client = $server->accept) {
      # Fork a child to handle the connection
      my $kidpid = fork;
      die $! unless defined $kidpid;
      # Proceed with next connection
      next if $kidpid;

      my $session = new Net::SPDY::Session ($client);
      while ($session->process_frame) {
           ...
      }
  }

Net::SPDY::Session represents the single stateful SPDY connection along with its state, which in called a session.

It provides access to the underlying protocol and convenience functions to access the state and communicate via the protocol.

compressor
Net::SPDY::Compressor object representing the Zlib streams (one in each direction) used by the framer. A new one is created upon session construction.
socket
IO::Handle instance that is used for actual network communication.
framer
Net::SPDY::Framer the protocol implementation on top of socket and compressor it is coupled with. A new one is created upon session construction.

new SOCKET
Creates a new session instance. First argument is the socket (either server or client, it does not matter) for the network communication.
process_frame
Read a single frame from the framer and process it, which may include changing session state and and eventually sending an appropriate response.
close
Do whatever is needed to terminate a connection. May involve sending a "GOAWAY" frame and closing the socket.

  • <https://developers.google.com/speed/spdy/> -- SPDY project web site
  • IO::Socket::SSL -- SSL/TLS socket bindings with NPN support
  • Net::SPDY::Framer -- SPDY protocol implementation
  • Net::SPDY::Compressor -- SPDY header compression

Source code for Net::SPDY is kept in a public GIT repository. Visit <https://github.com/lkundrak/net-spdy>.

Bugs reports and feature enhancement requests are tracked at <https://rt.cpan.org/Public/Dist/Display.html?Name=Net::SPDY>.

Copyright 2012, Lubomir Rintel

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

Lubomir Rintel "lkundrak@v3.sk"
2022-04-08 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.