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

AMF::Perl - Flash Remoting in Perl Translated from PHP Remoting v. 0.5b from the -PHP project.

Main gateway class. This is always the file you call from flash remoting-enabled server scripts.

This code should be present in your AMF::Perl gateway script, the one called by the Flash client.

To enable the client to call method bar() under service Foo, make sure MyCLass has a method called bar() and register an instance of your class.

        my $object = new MyClass();
        my $gateway = AMF::Perl->new;
        $gateway->registerService("Foo",$object);
        $gateway->service();

Or, if you have many services to register, create a package corresponding to each service and put them into a separate directory. Then register this directory name.

In the example below directory "services" may contain Foo.pm, Bar.pm etc. Therefore, services Foo and Bar are available. However, these packages must have a function called methodTable returning the names and descriptions of all possible methods to invoke. See the documentation and examples for details.

        my $gateway = AMF::Perl->new;
        $gateway->setBaseClassPath('./services');
        $gateway->service();

    Macromedia Flash Remoting server-side support.

        This file accepts the  data and deserializes it using the InputStream and Deserializer classes.
    Then the gateway builds the executive class which then loads the targeted class file
    and executes the targeted method via flash remoting.
    After the target uri executes the the gateway determines the data type of the data
    and serializes and returns the data back to the client.

None by default.

There is a mailing list for AMF::Perl. You can subscribe here: http://lists.sourceforge.net/lists/listinfo/flaph-general

The web page for the package is at: http://www.simonf.com/flap

Vsevolod (Simon) Ilyushchenko, simonf@simonf.com

Copyright (c) 2003 by Vsevolod (Simon) Ilyushchenko. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The code is based on the -PHP project (http://amfphp.sourceforge.net/)

ORIGINAL PHP Remoting CONTRIBUTORS Musicman - original design Justin - gateway architecture, class structure, datatype io additions John Cowen - datatype io additions, class structure Klaasjan Tukker - modifications, check routines, and register-framework

Chaned eval{} and amf_throw() to enable die() to work as well (instead of amf_throw()).

Made printing output a separate function, requested by Scott Penrose.
Wrote exportable amf_throw() for exception handling.

Changed "use Apache2" to "require Apache2" to avoid breaking on non-modperl systems.

Another patch from Kostas Chatzikokolakis fixing MP2 issues.

Patch from Kostas Chatzikokolakis handling encoding.
Changed non-mod_perl behavior for reading POST data from using <> to using read() to work around a bug in IIS
Joined code for mod_perl 1 and 2. Separated the output code for the mod_perl and non-mod_perl cases.

Changed new() to be invokable on objects, not just strings.

Added "binmode STDIN" before reading input to prevent treating 0x1a as EOF on Windows.

Added "binmode STDOUT" before printing headers to prevent conversion of 0a to 0d0a on Windows.
Added modperl 1 support and (so far commented out) hypothetical modperl 2 support.

Synching with AMF-PHP:
Added functions debugDir() and log() (debug() in PHP), added reading headers to service(). Added fromFile() to enable parsing traffic dumps.

Hey! The above document had some coding errors, which are explained below:
Around line 108:
'=item' outside of any '=over'
Around line 110:
You forgot a '=back' before '=head2'
2022-04-07 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.