pjsip logo pjsip.org
Open source SIP stack and media stack for presence, im/instant messaging, and multimedia communication

HOME

SIP/media Features
High Performance SIP
Small Footprint SIP
Symbian Port

FAQ

Documentation

Licensing

Download

Development (Trac)

Projects using pjsip

Mailing List

Open Source Links


About: PJLIB, PJLIB-UTIL, PJSIP, and PJMEDIA are created by: Benny Prijono
<bennylp@pjsip.org>


 

Home --> Documentations --> PJSIP Reference

pjsip_transport Struct Reference
[Transport]

#include <sip_transport.h>


Detailed Description

This structure represent the "public" interface of a SIP transport. Applications normally extend this structure to include transport specific members.

Data Fields

char obj_name [PJ_MAX_OBJ_NAME]
pj_pool_tpool
pj_atomic_tref_cnt
pj_lock_tlock
pj_bool_t tracing
pj_bool_t is_shutdown
pjsip_transport_key key
char * type_name
unsigned flag
char * info
int addr_len
pj_sockaddr local_addr
pjsip_host_port local_name
pjsip_host_port remote_name
pjsip_endpointendpt
pjsip_tpmgrtpmgr
pj_timer_entry idle_timer
pj_status_t(* send_msg )(pjsip_transport *transport, pjsip_tx_data *tdata, const pj_sockaddr_t *rem_addr, int addr_len, void *token, pjsip_transport_callback callback)
pj_status_t(* do_shutdown )(pjsip_transport *transport)
pj_status_t(* destroy )(pjsip_transport *transport)

Field Documentation

char pjsip_transport::obj_name[PJ_MAX_OBJ_NAME]

Name.

Pool used by transport.

Key for indexing this transport in hash table.

Type name.

Transport info/description.

Length of addresses.

Published name (eg. STUN).

Transport manager.

Timer when ref cnt is zero.

Function to be called by transport manager to send SIP message.

Parameters:
transport The transport to send the message.
packet The buffer to send.
length The length of the buffer to send.
op_key Completion token, which will be supplied to caller when pending send operation completes.
rem_addr The remote destination address.
addr_len Size of remote address.
callback If supplied, the callback will be called once a pending transmission has completed. If the function completes immediately (i.e. return code is not PJ_EPENDING), the callback will not be called.
Returns:
Should return PJ_SUCCESS only if data has been succesfully queued to operating system for transmission. Otherwise it may return PJ_EPENDING if the underlying transport can not send the data immediately and will send it later, which in this case caller doesn't have to do anything except wait the calback to be called, if it supplies one. Other return values indicate the error code.

Instruct the transport to initiate graceful shutdown procedure. After all objects release their reference to this transport, the transport will be deleted.

Note that application MUST use pjsip_transport_shutdown() instead.

Parameters:
transport The transport.
Returns:
PJ_SUCCESS on success.

Forcefully destroy this transport regardless whether there are objects that currently use this transport. This function should only be called by transport manager or other internal objects (such as the transport itself) who know what they're doing. Application should use pjsip_transport_shutdown() instead.

Parameters:
transport The transport.
Returns:
PJ_SUCCESS on success.


The documentation for this struct was generated from the following file:

 


PJSIP Open Source, high performance, small footprint, and very very portable SIP stack
(C)2003-2008 Benny Prijono