Ignore:
Timestamp:
Oct 7, 2007 12:51:15 PM (17 years ago)
Author:
bennylp
Message:

Updated PJNATH doxygen documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/include/pjnath/ice_strans.h

    r1434 r1487  
    3636/** 
    3737 * @defgroup PJNATH_ICE_STREAM_TRANSPORT ICE Stream Transport 
    38  * @brief Transport for media stream using ICE 
     38 * @brief Transport for media streams using ICE 
    3939 * @ingroup PJNATH_ICE 
    4040 * @{ 
     
    4545 * 
    4646 * ICE stream transport, as represented by #pj_ice_strans structure, is an ICE 
    47  * capable component for transporting media within a media stream.  
     47 * capable component for transporting media streams within a media session.  
    4848 * It consists of one or more transport sockets (typically two for RTP 
    4949 * based communication - one for RTP and one for RTCP), and an  
     
    6868 * transport is capable for restarting the ICE session being used and to 
    6969 * send STUN keep-alives for its STUN server reflexive and relayed 
    70  * candidates. 
    71  * 
    72  * \subsection PJNATH_ICE_ST_TRA_INIT Stream Transport Initialization 
     70 * candidates. When ICE stream transport detects that the STUN mapped 
     71 * address has changed in the keep-alive response, it will automatically 
     72 * update its address to the new address, and notify the application via 
     73 * \a on_addr_change() function of the #pj_ice_strans_cb callback. 
     74 * 
     75 * \subsection PJNATH_ICE_ST_TRA_INIT Initialization 
    7376 * 
    7477 * Application creates the ICE stream transport by calling  
    75  * #pj_ice_strans_create() function. 
     78 * #pj_ice_strans_create() function. Among other things, application needs 
     79 * to specify: 
     80 *      - STUN configuration (pj_stun_config), containing STUN settings 
     81 *        such as timeout values and the instances of timer heap and 
     82 *        ioqueue. 
     83 *      - Session name, useful for identifying this session in the log. 
     84 *      - Number of ICE components. 
     85 *      - Arbitrary user data, useful when associating the ICE session 
     86 *        with some application's data structure. 
     87 *      - A callback (#pj_ice_strans_cb) to receive events from the ICE 
     88 *        stream transport. Two of the most important fields in this 
     89 *        callback structure are \a on_rx_data() to notify application 
     90 *        about incoming data (perhaps RTP or RTCP packet), and 
     91 *        \a on_ice_complete() to notify application that ICE negotiation 
     92 *        has completed, either successfully or with failure. 
    7693 * 
    7794 * After the ICE stream transport is created, application may set up the 
    7895 * STUN servers to be used to obtain STUN server reflexive and relayed 
    7996 * candidate, by calling #pj_ice_strans_set_stun_domain() or  
    80  * #pj_ice_strans_set_stun_srv(). Then it has to create each component by 
    81  * calling #pj_ice_strans_create_comp(); this would create an actual socket 
     97 * #pj_ice_strans_set_stun_srv(). 
     98 * 
     99 * Application then creates each component by calling  
     100 * #pj_ice_strans_create_comp(); this would create an actual socket 
    82101 * which listens to the specified local address, and it would also 
    83102 * perform lookup to find various transport address candidates for this 
    84103 * socket. 
     104 * 
     105 * Adding component may involve contacting STUN and TURN servers to get 
     106 * STUN mapped address and allocate TURN relay channel, and this process 
     107 * may take some time to complete. Once application has added all 
     108 * components, it can check whether server reflexive and relayed  
     109 * candidates have been acquired, by calling #pj_ice_strans_get_comps_status(). 
    85110 *  
    86  * \subsection PJNATH_ICE_ST_TRA_INIT_ICE ICE Session Initialization 
     111 * \subsection PJNATH_ICE_ST_TRA_INIT_ICE Starting ICE Session 
    87112 * 
    88113 * When application is about to send an offer containing ICE capability, 
     
    96121 * \subsection PJNATH_ICE_ST_TRA_START Starting Connectivity Checks 
    97122 * 
    98  * Once application receives the SDP from remote, it can start ICE 
    99  * connectivity checks by calling #pj_ice_strans_start_ice(), specifying 
    100  * the username, password, and candidates of the remote agent. The ICE 
    101  * session/transport will then notify the application via the callback 
    102  * when ICE connectivity checks completes, either successfully or with 
    103  * failure. 
     123 * Once application receives the SDP from remote, it pairs local candidates 
     124 * with remote candidates, and can start ICE connectivity checks. This is 
     125 * done by calling #pj_ice_strans_start_ice(), specifying 
     126 * the remote candidate list, and remote username and password. If the 
     127 * pairing process is successful, ICE connectivity checks will begin 
     128 * immediately. The ICE session/transport will then notify the application  
     129 * via the callback when ICE connectivity checks completes, either  
     130 * successfully or with failure. 
     131 * 
     132 * \subsection PJNATH_ICE_ST_TRA_SEND_RECV Sending and Receiving Data 
     133 * 
     134 * Application can send data (normally RTP or RTCP packets) at any time 
     135 * by calling #pj_ice_strans_sendto(). This function takes a destination 
     136 * address as one of the arguments, and this destination address should 
     137 * be taken from the default transport address of the component (that is 
     138 * the address in SDP c= and m= lines, or in a=rtcp attribute).  
     139 * If ICE negotiation is in progress, this function will send the data  
     140 * to the destination address. Otherwise if ICE negotiation has completed 
     141 * successfully, this function will send the data to the nominated remote  
     142 * address, as negotiated by ICE. 
     143 * 
     144 * Upon receiving incoming data (that is a non-STUN  message), the ICE 
     145 * stream transport will notify the application by calling \a on_rx_data() 
     146 * of the #pj_ice_strans_cb callback. 
    104147 * 
    105148 * \subsection PJNATH_ICE_ST_TRA_STOP Stopping ICE Session 
     
    109152 * ICE session within this ICE stream transport. Note that this WILL NOT 
    110153 * destroy the sockets/transports, it only destroys the ICE session 
    111  * within this ICE stream transport. 
     154 * within this ICE stream transport. It is recommended that application  
     155 * retains the ICE stream transport to speed up the process of setting up 
     156 * the next call. The ICE stream transport will continue to send STUN  
     157 * keep-alive packets to keep the NAT binding open and to detect change  
     158 * in STUN mapped address. 
    112159 * 
    113160 * \subsection PJNATH_ICE_ST_TRA_RESTART Restarting ICE Session 
     
    570617 * Send outgoing packet using this transport. If ICE checks have not  
    571618 * produced a valid check for the specified component ID, this function  
    572  * will return with failure. Otherwise it will send the packet to remote 
    573  * destination using the nominated local candidate as have been checked 
     619 * send to the destination address. Otherwise it will send the packet to 
     620 * remote destination using the nominated local candidate as have been checked 
    574621 * previously. 
    575622 * 
Note: See TracChangeset for help on using the changeset viewer.