diff options
Diffstat (limited to 'pjsip/include/pjsip/sip_transport.h')
-rw-r--r-- | pjsip/include/pjsip/sip_transport.h | 55 |
1 files changed, 38 insertions, 17 deletions
diff --git a/pjsip/include/pjsip/sip_transport.h b/pjsip/include/pjsip/sip_transport.h index 29b5d8d1..dd3baea9 100644 --- a/pjsip/include/pjsip/sip_transport.h +++ b/pjsip/include/pjsip/sip_transport.h @@ -1,5 +1,4 @@ /* $Id$ - * */ #ifndef __PJSIP_SIP_TRANSPORT_H__ #define __PJSIP_SIP_TRANSPORT_H__ @@ -13,6 +12,7 @@ #include <pjsip/sip_parser.h> #include <pj/sock.h> #include <pj/list.h> +#include <pj/ioqueue.h>
PJ_BEGIN_DECL @@ -36,10 +36,13 @@ PJ_BEGIN_DECL */ struct pjsip_rx_data { - PJ_DECL_LIST_MEMBER(struct pjsip_rx_data) + //PJ_DECL_LIST_MEMBER(struct pjsip_rx_data); /** Memory pool for this buffer. */ pj_pool_t *pool; +
+ /** Ioqueue op key. */
+ pj_ioqueue_op_key_t op_key;
/** Time when the message was received. */ pj_time_val timestamp; @@ -73,21 +76,33 @@ struct pjsip_rx_data /** The From header as found in the message. */ pjsip_from_hdr *from; - /** The tag in the From header as found in the message. */ - pj_str_t from_tag; - /** The To header as found in the message. */ pjsip_to_hdr *to; - /** The To tag header as found in the message. */ - pj_str_t to_tag; - /** The topmost Via header as found in the message. */ pjsip_via_hdr *via; /** The CSeq header as found in the message. */ pjsip_cseq_hdr *cseq; - +
+ /** Max forwards header. */
+ pjsip_max_forwards_hdr *max_fwd;
+
+ /** The first route header. */
+ pjsip_route_hdr *route;
+
+ /** The first record-route header. */
+ pjsip_rr_hdr *record_route;
+
+ /** Content-type header. */
+ pjsip_ctype_hdr *ctype;
+
+ /** Content-length header. */
+ pjsip_clen_hdr *clen;
+
+ /** The first Require header. */
+ pjsip_require_hdr *require;
+
/** The list of error generated by the parser when parsing this message. */ pjsip_parser_err_report parse_err; }; @@ -109,7 +124,7 @@ struct pjsip_rx_data */ struct pjsip_tx_data { - PJ_DECL_LIST_MEMBER(struct pjsip_tx_data) + PJ_DECL_LIST_MEMBER(struct pjsip_tx_data); /** Memory pool for this buffer. */ pj_pool_t *pool; @@ -126,6 +141,9 @@ struct pjsip_tx_data /** The transport manager for this buffer. */ pjsip_transport_mgr *mgr; +
+ /** Ioqueue asynchronous operation key. */
+ pj_ioqueue_op_key_t op_key;
/** The message in this buffer. */ pjsip_msg *msg; @@ -355,14 +373,16 @@ pjsip_transport_get_remote_addr( const pjsip_transport_t * tr ); * * @param tr The transport to send the message. * @param tdata The outgoing message buffer. - * @param addr The remote address. + * @param addr The remote address.
+ * @param sent If not null, it will be filled up with the length of
+ * data sent. * - * @return The number of bytes sent, or zero if the connection - * has closed, or -1 on error. + * @return PJ_SUCCESS on success, or the appropriate error code. */ -PJ_DECL(int) pjsip_transport_send_msg( pjsip_transport_t *tr, - pjsip_tx_data *tdata, - const pj_sockaddr_in *addr); +PJ_DECL(pj_status_t) pjsip_transport_send_msg( pjsip_transport_t *tr, + pjsip_tx_data *tdata, + const pj_sockaddr_in *addr,
+ pj_ssize_t *sent); /** @@ -386,7 +406,8 @@ PJ_DECL(int) pjsip_transport_send_msg( pjsip_transport_t *tr, * @param mgr The transport manager. * @return The transmit buffer data, or NULL on error. */ -pjsip_tx_data* pjsip_tx_data_create( pjsip_transport_mgr *mgr ); +pj_status_t pjsip_tx_data_create( pjsip_transport_mgr *mgr,
+ pjsip_tx_data **tdata ); /** |