BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJNATH Reference

turn_session.h File Reference

Transport independent TURN client session. More...

Go to the source code of this file.

Data Structures

struct  pj_turn_channel_data
struct  pj_turn_session_cb
struct  pj_turn_alloc_param
struct  pj_turn_session_info

Typedefs

typedef struct pj_turn_session pj_turn_session

Enumerations

enum  pj_turn_tp_type {
  PJ_TURN_TP_UDP = 17,
  PJ_TURN_TP_TCP = 6,
  PJ_TURN_TP_TLS = 255
}
enum  pj_turn_state_t {
  PJ_TURN_STATE_NULL,
  PJ_TURN_STATE_RESOLVING,
  PJ_TURN_STATE_RESOLVED,
  PJ_TURN_STATE_ALLOCATING,
  PJ_TURN_STATE_READY,
  PJ_TURN_STATE_DEALLOCATING,
  PJ_TURN_STATE_DEALLOCATED,
  PJ_TURN_STATE_DESTROYING
}

Functions

void pj_turn_alloc_param_default (pj_turn_alloc_param *prm)
void pj_turn_alloc_param_copy (pj_pool_t *pool, pj_turn_alloc_param *dst, const pj_turn_alloc_param *src)
const char * pj_turn_state_name (pj_turn_state_t state)
pj_status_t pj_turn_session_create (const pj_stun_config *cfg, const char *name, int af, pj_turn_tp_type conn_type, const pj_turn_session_cb *cb, unsigned options, void *user_data, pj_turn_session **p_sess)
pj_status_t pj_turn_session_shutdown (pj_turn_session *sess)
pj_status_t pj_turn_session_destroy (pj_turn_session *sess, pj_status_t last_err)
pj_status_t pj_turn_session_get_info (pj_turn_session *sess, pj_turn_session_info *info)
pj_status_t pj_turn_session_set_user_data (pj_turn_session *sess, void *user_data)
void * pj_turn_session_get_user_data (pj_turn_session *sess)
void pj_turn_session_set_log (pj_turn_session *sess, unsigned flags)
pj_status_t pj_turn_session_set_software_name (pj_turn_session *sess, const pj_str_t *sw)
pj_status_t pj_turn_session_set_server (pj_turn_session *sess, const pj_str_t *domain, int default_port, pj_dns_resolver *resolver)
pj_status_t pj_turn_session_set_credential (pj_turn_session *sess, const pj_stun_auth_cred *cred)
pj_status_t pj_turn_session_alloc (pj_turn_session *sess, const pj_turn_alloc_param *param)
pj_status_t pj_turn_session_set_perm (pj_turn_session *sess, unsigned addr_cnt, const pj_sockaddr addr[], unsigned options)
pj_status_t pj_turn_session_sendto (pj_turn_session *sess, const pj_uint8_t *pkt, unsigned pkt_len, const pj_sockaddr_t *peer_addr, unsigned addr_len)
pj_status_t pj_turn_session_bind_channel (pj_turn_session *sess, const pj_sockaddr_t *peer, unsigned addr_len)
pj_status_t pj_turn_session_on_rx_pkt (pj_turn_session *sess, void *pkt, pj_size_t pkt_len, pj_size_t *parsed_len)

Detailed Description

 


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