BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJNATH Reference

pj_ice_sess_cb Struct Reference
[ICE Session]

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

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

Parameters:
ice The ICE session.
status Will 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:
ice The ICE session.
comp_id ICE component ID.
transport_id Transport ID.
pkt The whole packet.
size Size of the packet.
src_addr Source address where this packet was received from.
src_addr_len The 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:
ice The ICE session.
comp_id ICE component ID.
transport_id Transport ID.
pkt The STUN packet.
size The size of the packet.
dst_addr Packet destination address.
dst_addr_len Length 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.