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

Data Fields

pj_grp_lock_tgrp_lock
 
unsigned max_pkt_size
 
pj_qos_type qos_type
 
pj_qos_params qos_params
 
pj_bool_t qos_ignore_error
 
pj_sockaddr bound_addr
 
pj_uint16_t port_range
 
unsigned so_rcvbuf_size
 
unsigned so_sndbuf_size
 
pj_turn_sock_tls_cfg tls_cfg
 

Detailed Description

This structure describes options that can be specified when creating the TURN socket. Application should call pj_turn_sock_cfg_default() to initialize this structure with its default values before using it.

Field Documentation

◆ bound_addr

pj_sockaddr pj_turn_sock_cfg::bound_addr

Specify the interface where the socket should be bound to. If the address is zero, socket will be bound to INADDR_ANY. If the address is non-zero, socket will be bound to this address only. If the port is set to zero, the socket will bind at any port (chosen by the OS).

◆ grp_lock

pj_grp_lock_t* pj_turn_sock_cfg::grp_lock

The group lock to be used by the STUN socket. If NULL, the STUN socket will create one internally.

Default: NULL

◆ max_pkt_size

unsigned pj_turn_sock_cfg::max_pkt_size

Packet buffer size.

Default value is PJ_TURN_MAX_PKT_LEN.

◆ port_range

pj_uint16_t pj_turn_sock_cfg::port_range

Specify the port range for TURN socket binding, relative to the start port number specified in bound_addr. Note that this setting is only applicable when the start port number is non zero.

Default value is zero.

◆ qos_ignore_error

pj_bool_t pj_turn_sock_cfg::qos_ignore_error

Specify if STUN socket should ignore any errors when setting the QoS traffic type/parameters.

Default: PJ_TRUE

◆ qos_params

pj_qos_params pj_turn_sock_cfg::qos_params

Set the low level QoS parameters to the transport. This is a lower level operation than setting the qos_type field and may not be supported on all platforms.

By default all settings in this structure are not set.

◆ qos_type

pj_qos_type pj_turn_sock_cfg::qos_type

QoS traffic type to be set on this transport. When application wants to apply QoS tagging to the transport, it's preferable to set this field rather than qos_param fields since this is more portable.

Default value is PJ_QOS_TYPE_BEST_EFFORT.

◆ so_rcvbuf_size

unsigned pj_turn_sock_cfg::so_rcvbuf_size

Specify target value for socket receive buffer size. It will be applied using setsockopt(). When it fails to set the specified size, it will try with lower value until the highest possible has been successfully set.

Default: 0 (OS default)

◆ so_sndbuf_size

unsigned pj_turn_sock_cfg::so_sndbuf_size

Specify target value for socket send buffer size. It will be applied using setsockopt(). When it fails to set the specified size, it will try with lower value until the highest possible has been successfully set.

Default: 0 (OS default)

◆ tls_cfg

pj_turn_sock_tls_cfg pj_turn_sock_cfg::tls_cfg

This specifies TLS settings for TLS transport. It is only be used when this TLS is used to connect to the TURN server.


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.