Ignore:
Timestamp:
Feb 22, 2007 2:09:23 AM (17 years ago)
Author:
bennylp
Message:

Continuing work on the new STUN framework, partly implemented the client session

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib-util/include/pjlib-util/stun_transaction.h

    r992 r993  
    7474    void        (*on_complete)(pj_stun_client_tsx *tsx, 
    7575                               pj_status_t status,  
    76                                pj_stun_msg *response); 
     76                               const pj_stun_msg *response); 
    7777 
    7878    /** 
     
    125125 
    126126/** 
     127 * Check if transaction has completed. 
     128 * 
     129 * @param tsx           The STUN transaction. 
     130 * 
     131 * @return              Non-zero if transaction has completed. 
     132 */ 
     133PJ_DECL(pj_bool_t) pj_stun_client_tsx_is_complete(pj_stun_client_tsx *tsx); 
     134 
     135 
     136/** 
    127137 * Associate an arbitrary data with the STUN transaction. This data 
    128138 * can be then retrieved later from the transaction, by using 
     
    187197 * @return              PJ_SUCCESS on success or the appropriate error code. 
    188198 */ 
    189 PJ_DECL(pj_status_t) pj_stun_client_tsx_on_rx_msg(pj_stun_client_tsx *tsx, 
     199PJ_DECL(pj_status_t) pj_stun_client_tsx_on_rx_pkt(pj_stun_client_tsx *tsx, 
    190200                                                  const void *packet, 
    191201                                                  pj_size_t pkt_size, 
     
    193203 
    194204 
     205/** 
     206 * Notify the STUN transaction about the arrival of STUN response. 
     207 * If the STUN response contains a final error (300 and greater), the 
     208 * transaction will be terminated and callback will be called. If the 
     209 * STUN response contains response code 100-299, retransmission 
     210 * will  cease, but application must still call this function again 
     211 * with a final response later to allow the transaction to complete. 
     212 * 
     213 * @param tsx           The STUN client transaction instance. 
     214 * @param packet        The incoming packet. 
     215 * @param pkt_size      Size of the incoming packet. 
     216 * @param parsed_len    Optional pointer to receive the number of bytes 
     217 *                      that have been parsed from the incoming packet 
     218 *                      for the STUN message. This is useful if the 
     219 *                      STUN transaction is running over stream oriented 
     220 *                      socket such as TCP or TLS. 
     221 * 
     222 * @return              PJ_SUCCESS on success or the appropriate error code. 
     223 */ 
     224PJ_DECL(pj_status_t) pj_stun_client_tsx_on_rx_msg(pj_stun_client_tsx *tsx, 
     225                                                  const pj_stun_msg *msg); 
     226 
    195227 
    196228/** 
Note: See TracChangeset for help on using the changeset viewer.