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_strans.h>

Data Fields

void(* on_rx_data )(pj_ice_strans *ice_st, unsigned comp_id, void *pkt, pj_size_t size, const pj_sockaddr_t *src_addr, unsigned src_addr_len)
 
void(* on_data_sent )(pj_ice_strans *sock, pj_ssize_t sent)
 
void(* on_valid_pair )(pj_ice_strans *ice_st)
 
void(* on_ice_complete )(pj_ice_strans *ice_st, pj_ice_strans_op op, pj_status_t status)
 
void(* on_new_candidate )(pj_ice_strans *ice_st, const pj_ice_sess_cand *cand, pj_bool_t end_of_cand)
 

Detailed Description

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

Field Documentation

◆ on_data_sent

void(* pj_ice_strans_cb::on_data_sent) (pj_ice_strans *sock, pj_ssize_t sent)

This callback is optional and will be called to notify the status of async send operations.

Parameters
ice_stThe ICE stream transport.
sentIf value is positive non-zero it indicates the number of data sent. When the value is negative, it contains the error code which can be retrieved by negating the value (i.e. status=-sent).

◆ on_ice_complete

void(* pj_ice_strans_cb::on_ice_complete) (pj_ice_strans *ice_st, pj_ice_strans_op op, pj_status_t status)

Callback to report status of various ICE operations.

Parameters
ice_stThe ICE stream transport.
opThe operation which status is being reported.
statusOperation status.

◆ on_new_candidate

void(* pj_ice_strans_cb::on_new_candidate) (pj_ice_strans *ice_st, const pj_ice_sess_cand *cand, pj_bool_t end_of_cand)

Callback to report a new ICE local candidate, e.g: after successful STUN Binding, after a successful TURN allocation. Only new candidates whose type is server reflexive or relayed will be notified via this callback. This callback also indicates end-of-candidate via parameter 'last'.

Trickle ICE can use this callback to convey the new candidate to remote agent and monitor end-of-candidate indication.

Parameters
ice_stThe ICE stream transport.
candThe new local candidate, can be NULL when the last local candidate initialization failed/timeout.
end_of_candPJ_TRUE if this is the last of local candidate.

◆ on_rx_data

void(* pj_ice_strans_cb::on_rx_data) (pj_ice_strans *ice_st, unsigned comp_id, void *pkt, pj_size_t size, const pj_sockaddr_t *src_addr, unsigned src_addr_len)

This callback will be called when the ICE transport receives incoming packet from the sockets which is not related to ICE (for example, normal RTP/RTCP packet destined for application).

Parameters
ice_stThe ICE stream transport.
comp_idThe component ID.
pktThe packet.
sizeSize of the packet.
src_addrSource address of the packet.
src_addr_lenLength of the source address.

◆ on_valid_pair

void(* pj_ice_strans_cb::on_valid_pair) (pj_ice_strans *ice_st)

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

Parameters
ice_stThe ICE stream transport.

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.