Iray SDK API nvidia_logo_transpbg.gif Up
mi::rtmp::IConnection Class Referenceabstract

The connection class represents a connection from a client to the server. More...

#include <rtmp.h>

Inheritance diagram for mi::rtmp::IConnection:

Public Member Functions

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 IMapget_statistics () const =0
 Returns statistics for the connection. More...
 
virtual const char * get_peer_address () const =0
 Get the IP and port of the remote client. More...
 
virtual Sint32 set_property (const char *key, const char *value)=0
 Sets a property on the connection. More...
 
virtual const char * get_property (const char *key) const =0
 Returns a property from the connection. More...
 
- Public Member Functions inherited from mi::base::IInterface
virtual Uint32 retain () const =0
 Increments the reference count. More...
 
virtual Uint32 release () const =0
 Decrements the reference count. More...
 
virtual const IInterfaceget_interface (const Uuid &interface_id) const =0
 Acquires a const interface from another. More...
 
template<class T>
const T * get_interface () const
 Acquires a const interface from another. More...
 
virtual IInterfaceget_interface (const Uuid &interface_id)=0
 Acquires a mutable interface from another. More...
 
template<class T>
T * get_interface ()
 Acquires a mutable interface from another. More...
 
virtual Uuid get_iid () const =0
 Returns the interface ID of the most derived interface. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x9a4d6604, ... >
typedef Interface_declare< id1, ... > Self
 Own type. More...
 
typedef Uuid_t< id1, ... > IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::IInterface
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> IID
 Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x9a4d6604, ... >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 
- Static Public Member Functions inherited from mi::base::IInterface
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface. More...
 

Detailed 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.

Note
A pointer to an IConnection interface is only valid inside the callback's handle method.

Member Function Documentation

 get_peer_address()

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.

 get_property()

virtual const char * mi::rtmp::IConnection::get_property ( const char *  key) const
pure virtual

Returns a property from the connection.

Parameters
keyThe key to obtain the value for.
Returns
The value of the property or NULL if it does not exist.

 get_statistics()

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.

 register_remote_call_handler()

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_handlerThe call event handler for that procedure name. The value NULL removes the installed handler.
procedure_nameThe 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.

 register_stream_event_handler()

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_handlerThe stream event handler. The value NULL removes the installed handler.

 set_property()

virtual Sint32 mi::rtmp::IConnection::set_property ( const char *  key,
const char *  value 
)
pure virtual

Sets a property on the connection.

Parameters
keyThe key to set the value for.
valueThe value of the property.
Returns
  • 0: Success.
  • -1: Invalid key or value.