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


Manual Reference Pages  -  SWF::BINSTREAM::CODEC (3)

.ds Aq ’

NAME

SWF::BinStream::Codec - Document for SWF::BinStream codecs.

CONTENTS

SYNOPSIS



  use SWF::BinStream;
  ....
  $stream->add_codec(Foo);

  ----

  package SWF::BinStream::Codec::Foo;

  $VERSION=x.xx;

  package SWF::BinStream::Codec::Foo::Read;

  sub new {}
  sub decode {}
  sub close {}

  package SWF::BinStream::Codec::Foo::Write;

  sub new {}
  sub encode {}
  sub close {}

  1;



DESCRIPTION

SWF::BinStream:Codec::* package provides additive codecs for SWF::BinStream.

The whole package name must be ’SWF::BinStream::Codec::[name]’. SWF::BinStream use the package when its add_codec method is called with the name. Two sub package, ’SWF::BinStream::Codec::[name]::Read’ and ’SWF::BinStream::Codec::[name]::Write’ should contain the package.

    METHODS

The codec class must equip these methods. Each method should die when error occurs.

SWF::BinStream::[name]::Read
SWF::BinStream::[name]::Read->new; should return a new decoder. It does not take any parameters.
$codec->decode( $data ); is called with the data read from the stream. It should return decoded data.
$codec->close; is called when the stream is closed. It does not take any parameters.
SWF::BinStream::[name]::Write
SWF::BinStream::[name]::Write->new; should return a new encoder. It does not take any parameters.
$codec->encode( $data ); is called with the data to write to the stream. It should return encoded data.
$codec->close( $data ); is called when the stream is to be closed. It is called with the rest of bufferred data. It should return encoded data.

COPYRIGHT

Copyright 2002 Yasuhiro Sasama (ySas), <ysas@nmt.ne.jp>

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

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


perl v5.20.3 SWF::BINSTREAM::CODEC (3) 2016-03-17

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