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:

  1. accept client connections
  2. reject client connections
  3. broadcast a message to all clients connected to an application instance
  4. create persistent shared objects (write to file)
  5. create non-persistent shared objects (store in memory)
  6. delete persistent shared objects
  7. delete non-persistent shared objects
  8. clear a single stream associated with an application instance
  9. clear all streams associated with an application instance
  10. clear persistent streams (flv, mp3, mp4 etc)
  11. retrieve an array of all connected clients in an application
  12. edit the application configuration file
  13. terminate the connection of a client to an application
  14. invoke the garbage collector to reclaim any unused resources for an application instance
  15. retrieve an object containing statistics about the application instance
  16. retrieve the host name of the server
  17. retrieve the platform and version of the server
  18. register a handler that gets called when the application instance is started
  19. register a handler that gets called when the application instance is about to be removed
  20. register a handler that gets called when a client connects to the application instance
  21. register a handler that gets called when a client connection attempt was rejected
  22. register a handler that gets called when a client disconnects from an application
  23. register a handler that gets called when a client publishes a stream to an application
  24. register a handler that gets called when the server encounters an error while processing a message that was targeted at the application
  25. register a handler that gets called when a client stops publishing a stream to an application
  26. reject a connection and provide a redirection url
  27. register a constructor function that is used when deserializing an object of a certain class type
  28. register methods to be proxied to other application instances on the same server or a different server
  29. reject the connection call from a client
  30. unload an application instance

Client

Items related to a user, or client, connection to a application instance.

Ability to:

  1. retrieve the version and platform of the client
  2. enable Flash Player to access raw, uncompressed audio data from streams
  3. enable Flash Player to access raw, uncompressed video data from streams
  4. execute a method on a client or on another server
  5. detect current client bandwidth
  6. detect maximum client bandwidth
  7. retrieve statistics for the client
  8. check for the length of a stream
  9. retrieve the unique id for a client
  10. retrieve the IP address of a client
  11. retrieve the URL of the web page in which the client SWF file is embedded or the server in which this connection originated.
  12. send a ping message to the client
  13. retrieve the protocol used by the client
  14. retrieve a list of directories containing application resources (shared objects and streams) to which the client has read access
  15. give the client write access to directories that contain application resources (such as shared objects and streams)
  16. define methods that can be invoked by other clients or servers
  17. retrieve whether the client is using an SSL connection or not
  18. 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:

  1. add a context header to the AMF packet structure.
  2. invoke a command or method on another RTMP server or an application server like PyAMF to which the application instance is connected
  3. create a connection to another RTMP server or to a Flash Remoting gateway such as PyAMF
  4. close the connection
  5. check whether a connection has been made
  6. set the AMF version used to pass binary data between two servers
  7. register a handler that gets called when the status of the NetConnection object changes
  8. 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:

  1. create a NetStream
  2. retrieve the number of seconds assigned to the buffer
  3. set the size of the outgoing buffer in seconds
  4. register a handler that gets called every time a status change or error occurs in a NetStream object
  5. publish a NetStream to another server
  6. broadcast a data message over a stream
  7. 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:

  1. control whether the server periodically stores all persistent shared objects
  2. delete all the properties of a single shared object and sends a clear event to all clients that subscribe to a persistent shared object
  3. remove a reference to a shared object from memory
  4. store a persistent shared object instance or all persistent shared object instances
  5. save the current state of a persistent shared object
  6. create a shared object