WARNING: The online documentation has moved to https://docs.pjsip.org.

Visit the new documentation at https://docs.pjsip.org:

BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJNATH Reference

#include <ice_session.h>

Data Fields

void(* on_valid_pair )(pj_ice_sess *ice)
 
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

◆ on_ice_complete

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.

◆ on_rx_data

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.

◆ on_tx_pkt

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.

◆ on_valid_pair

void(* pj_ice_sess_cb::on_valid_pair) (pj_ice_sess *ice)

An optional callback that will be called by the ICE session when a valid pair has been found during ICE negotiation.

Parameters
iceThe ICE session.

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.