Priority List
This document serves as a priority list for the functionality that the RTMPy library should have.
Application
Applications are used to accept and reject client connection attempts, to register and unregister classes and proxies, and to manage the life cycle of an application. Applications have callback functions that are invoked when an application starts and stops and when a client connects and disconnects.
Ability to:
- accept client connections
- reject client connections
- broadcast a message to all clients connected to an application instance
- create persistent shared objects (write to file)
- create non-persistent shared objects (store in memory)
- delete persistent shared objects
- delete non-persistent shared objects
- clear a single stream associated with an application instance
- clear all streams associated with an application instance
- clear persistent streams (flv, mp3, mp4 etc)
- retrieve an array of all connected clients in an application
- edit the application configuration file
- terminate the connection of a client to an application
- invoke the garbage collector to reclaim any unused resources for an application instance
- retrieve an object containing statistics about the application instance
- retrieve the host name of the server
- retrieve the platform and version of the server
- register a handler that gets called when the application instance is started
- register a handler that gets called when the application instance is about to be removed
- register a handler that gets called when a client connects to the application instance
- register a handler that gets called when a client connection attempt was rejected
- register a handler that gets called when a client disconnects from an application
- register a handler that gets called when a client publishes a stream to an application
- register a handler that gets called when the server encounters an error while processing a message that was targeted at the application
- register a handler that gets called when a client stops publishing a stream to an application
- reject a connection and provide a redirection url
- register a constructor function that is used when deserializing an object of a certain class type
- register methods to be proxied to other application instances on the same server or a different server
- reject the connection call from a client
- unload an application instance
Client
Items related to a user, or client, connection to a application instance.
Ability to:
- retrieve the version and platform of the client
- enable Flash Player to access raw, uncompressed audio data from streams
- enable Flash Player to access raw, uncompressed video data from streams
- execute a method on a client or on another server
- detect current client bandwidth
- detect maximum client bandwidth
- retrieve statistics for the client
- check for the length of a stream
- retrieve the unique id for a client
- retrieve the IP address of a client
- retrieve the URL of the web page in which the client SWF file is embedded or the server in which this connection originated.
- send a ping message to the client
- retrieve the protocol used by the client
- retrieve a list of directories containing application resources (shared objects and streams) to which the client has read access
- give the client write access to directories that contain application resources (such as shared objects and streams)
- define methods that can be invoked by other clients or servers
- retrieve whether the client is using an SSL connection or not
- retrieve the URI specified by the client to connect to this application instance
NetConnection
The NetConnection class lets you create a two-way connection between a application instance and an application server like PyAMF, another RTMP server, or another application instance on the same server.
Ability to:
- add a context header to the AMF packet structure.
- invoke a command or method on another RTMP server or an application server like PyAMF to which the application instance is connected
- create a connection to another RTMP server or to a Flash Remoting gateway such as PyAMF
- close the connection
- check whether a connection has been made
- set the AMF version used to pass binary data between two servers
- register a handler that gets called when the status of the NetConnection object changes
- retrieve the URI of the connected NetConnection
NetStream
A NetStream opens a one-way streaming connection between 2 RTMP servers through a NetConnection object.
Ability to:
- create a NetStream
- retrieve the number of seconds assigned to the buffer
- set the size of the outgoing buffer in seconds
- register a handler that gets called every time a status change or error occurs in a NetStream object
- publish a NetStream to another server
- broadcast a data message over a stream
- retrieve the number of seconds the stream has been publishing
SharedObject
The SharedObject? class lets you store data on the server and share data between multiple client applications in real time.
Ability to:
- control whether the server periodically stores all persistent shared objects
- delete all the properties of a single shared object and sends a clear event to all clients that subscribe to a persistent shared object
- remove a reference to a shared object from memory
- store a persistent shared object instance or all persistent shared object instances
- save the current state of a persistent shared object
- create a shared object
