BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJNATH Reference

Data Fields

void(* on_ice_complete )(pj_ice_sess *ice, pj_status_t status)
 
pj_status_t(* on_tx_pkt )(pj_ice_sess *ice, unsigned comp_id, unsigned transport_id, const void *pkt, pj_size_t size, const pj_sockaddr_t *dst_addr, unsigned dst_addr_len)
 
void(* on_rx_data )(pj_ice_sess *ice, unsigned comp_id, unsigned transport_id, void *pkt, pj_size_t size, const pj_sockaddr_t *src_addr, unsigned src_addr_len)
 

Detailed Description

This structure contains callbacks that will be called by the ICE session.

Field Documentation

void(* pj_ice_sess_cb::on_ice_complete)(pj_ice_sess *ice, pj_status_t status)

An optional callback that will be called by the ICE session when ICE negotiation has completed, successfully or with failure.

Parameters
iceThe ICE session.
statusWill contain PJ_SUCCESS if ICE negotiation is successful, or some error code.
void(* pj_ice_sess_cb::on_rx_data)(pj_ice_sess *ice, unsigned comp_id, unsigned transport_id, void *pkt, pj_size_t size, const pj_sockaddr_t *src_addr, unsigned src_addr_len)

A mandatory callback which will be called by the ICE session when it receives packet which is not part of ICE negotiation.

Parameters
iceThe ICE session.
comp_idICE component ID.
transport_idTransport ID.
pktThe whole packet.
sizeSize of the packet.
src_addrSource address where this packet was received from.
src_addr_lenThe length of source address.
pj_status_t(* pj_ice_sess_cb::on_tx_pkt)(pj_ice_sess *ice, unsigned comp_id, unsigned transport_id, const void *pkt, pj_size_t size, const pj_sockaddr_t *dst_addr, unsigned dst_addr_len)

A mandatory callback which will be called by the ICE session when it needs to send outgoing STUN packet.

Parameters
iceThe ICE session.
comp_idICE component ID.
transport_idTransport ID.
pktThe STUN packet.
sizeThe size of the packet.
dst_addrPacket destination address.
dst_addr_lenLength of destination address.

The documentation for this struct was generated from the following file:

 


PJNATH - Open Source NAT traversal helper library supporting STUN, TURN, and ICE
Copyright (C) 2006-2009 Teluu Inc.