mi::rtmp::IConnection Class Reference
[RTMP server]
Description
The connection class represents a connection from a client to the server. An instance of this interface is passed into some of the registered callbacks.
A pointer to an IConnection interface is only valid inside the callback's handle method.
Public Member Functions
- virtual const char* get_peer_address() const =0
- Get the IP and port of the remote client. More...
- virtual const char* get_property( const char* key) const =0
- Returns a property from the connection. More...
- virtual IMap* get_statistics() const =0
- Returns statistics for the connection. More...
- virtual void register_remote_call_handler( ICall_event_handler* call_handler, const char* procedure_name = 0) =0
- Registers a call event handler for the passed procedure name. More...
- virtual void register_stream_event_handler( IStream_event_handler* stream_event_handler) =0
- Registers a stream event handler. More...
- virtual Sint32 set_property( const char* key, const char* value) =0
- Sets a property on the connection. More...
Member Functions
- virtual const char* mi::rtmp::IConnection::get_peer_address() const [pure virtual]
-
Get the IP and port of the remote client.
Returns
The address of the peer of the connection.
- virtual const char* mi::rtmp::IConnection::get_property( const char* key) const [pure virtual]
-
Returns a property from the connection.
Parameters
- key
- The key to obtain the value for.
Returns
The value of the property or NULL if it does not exist.
- virtual IMap* mi::rtmp::IConnection::get_statistics() const [pure virtual]
-
Returns statistics for the connection. The contents are on purpose not documented but can be iterated over and printed for information purposes.
Note:The IMap returned need to be released to avoid a memory leak.
Returns
The statistics for the connection.
- virtual void mi::rtmp::IConnection::register_remote_call_handler( ICall_event_handler* call_handler, const char* procedure_name = 0) [pure virtual]
-
Registers a call event handler for the passed procedure name.
Parameters
- call_handler
- The call event handler for that procedure name. The value NULL removes the installed handler.
- procedure_name
- The name of the remote call procedure. If not passed or set to NULL this will mean this call event handler will be the the default handler when no other specific handler was found.
- virtual void mi::rtmp::IConnection::register_stream_event_handler( IStream_event_handler* stream_event_handler) [pure virtual]
-
Registers a stream event handler. The stream event handler will get called when streams get created or removed.
Parameters
- stream_event_handler
- The stream event handler. The value NULL removes the installed handler.
- virtual Sint32 mi::rtmp::IConnection::set_property( const char* key, const char* value) [pure virtual]
-
Sets a property on the connection.
Parameters
- key
- The key to set the value for.
- value
- The value of the property.
Returns
- 0: Success.
- -1: Invalid key or value.