summaryrefslogtreecommitdiff
path: root/pjsip/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2005-11-19 20:28:08 +0000
committerBenny Prijono <bennylp@teluu.com>2005-11-19 20:28:08 +0000
commit934277a3b49d493187f195899fcc49b838d16cdb (patch)
treeb4ec4fe403981553fe92adc2a581092b0239119d /pjsip/include
parent87b05ce12596910229d12c59aebfe566d00e8a96 (diff)
Changed transaction to refrect new transport changes
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@58 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include')
-rw-r--r--pjsip/include/pjsip/sip_transport.h2
-rw-r--r--pjsip/include/pjsip/sip_transport_udp.h68
2 files changed, 69 insertions, 1 deletions
diff --git a/pjsip/include/pjsip/sip_transport.h b/pjsip/include/pjsip/sip_transport.h
index 741f5478..869641bd 100644
--- a/pjsip/include/pjsip/sip_transport.h
+++ b/pjsip/include/pjsip/sip_transport.h
@@ -332,7 +332,7 @@ struct pjsip_tx_data
/** Transport manager internal. */
void *token;
- void (*cb)(void*, pjsip_tx_data*, pj_status_t);
+ void (*cb)(void*, pjsip_tx_data*, pj_ssize_t);
};
diff --git a/pjsip/include/pjsip/sip_transport_udp.h b/pjsip/include/pjsip/sip_transport_udp.h
new file mode 100644
index 00000000..10ace7fc
--- /dev/null
+++ b/pjsip/include/pjsip/sip_transport_udp.h
@@ -0,0 +1,68 @@
+/* $Id: $ */
+/*
+ * Copyright (C) 2003-2006 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#ifndef __PJSIP_TRANSPORT_UDP_H__
+#define __PJSIP_TRANSPORT_UDP_H__
+
+#include <pjsip/sip_transport.h>
+
+PJ_DECL
+
+/**
+ * Start UDP transport.
+ *
+ * @param endpt The SIP endpoint.
+ * @param local Local address to bind.
+ * @param pub_addr Public address to advertise.
+ * @param async_cnt Number of simultaneous async operations.
+ * @param p_transport Pointer to receive the transport.
+ *
+ * @return PJ_SUCCESS when the transport has been successfully
+ * started and registered to transport manager, or
+ * the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_udp_transport_start(pjsip_endpoint *endpt,
+ const pj_sockaddr_in *local,
+ const pj_sockaddr_in *pub_addr,
+ unsigned async_cnt,
+ pjsip_transport **p_transport);
+
+/**
+ * Attach UDP socket as a new transport and start the transport.
+ *
+ * @param endpt The SIP endpoint.
+ * @param sock UDP socket to use.
+ * @param pub_addr Public address to advertise.
+ * @param async_cnt Number of simultaneous async operations.
+ * @param p_transport Pointer to receive the transport.
+ *
+ * @return PJ_SUCCESS when the transport has been successfully
+ * started and registered to transport manager, or
+ * the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_udp_transport_attach(pjsip_endpoint *endpt,
+ pj_sock_t sock,
+ const pj_sockaddr_in *pub_addr,
+ unsigned async_cnt,
+ pjsip_transport **p_transport);
+
+
+PJ_END_DECL
+
+
+#endif /* __PJSIP_TRANSPORT_UDP_H__ */