Changeset 1387 for pjproject/trunk/pjsip/include/pjsip/sip_transport.h
- Timestamp:
- Jun 23, 2007 4:22:51 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsip/sip_transport.h
r1310 r1387 905 905 typedef pj_status_t (*pjsip_tx_callback)(pjsip_endpoint*, pjsip_tx_data*); 906 906 /** 907 * Create a new transport manager. 907 * Create a transport manager. Normally application doesn't need to call 908 * this function directly, since a transport manager will be created and 909 * destroyed automatically by the SIP endpoint. 908 910 * 909 911 * @param pool Pool. … … 960 962 961 963 /** 962 * Destroy transport manager. 964 * Destroy a transport manager. Normally application doesn't need to call 965 * this function directly, since a transport manager will be created and 966 * destroyed automatically by the SIP endpoint. 967 * 968 * @param mgr The transport manager. 969 * 970 * @return PJ_SUCCESS on success. 963 971 */ 964 972 PJ_DECL(pj_status_t) pjsip_tpmgr_destroy(pjsip_tpmgr *mgr); … … 966 974 967 975 /** 968 * Dump transport info. 976 * Dump transport info and status to log. 977 * 978 * @param mgr The transport manager. 969 979 */ 970 980 PJ_DECL(void) pjsip_tpmgr_dump_transports(pjsip_tpmgr *mgr); … … 1003 1013 pjsip_transport **tp); 1004 1014 1015 /** 1016 * Type of callback to receive notification when message or raw data 1017 * has been sent. 1018 * 1019 * @param token The token that was given when calling the function 1020 * to send message or raw data. 1021 * @param tdata The transmit buffer used to send the message. 1022 * @param bytes_sent Number of bytes sent. On success, the value will be 1023 * positive number indicating the number of bytes sent. 1024 * On failure, the value will be a negative number of 1025 * the error code (i.e. bytes_sent = -status). 1026 */ 1005 1027 typedef void (*pjsip_tp_send_callback)(void *token, pjsip_tx_data *tdata, 1006 pj_ssize_t bytes_sent); 1007 /** 1008 * Send a SIP message using the specified transport. 1028 pj_ssize_t bytes_sent); 1029 1030 1031 /** 1032 * This is a low-level function to send a SIP message using the specified 1033 * transport to the specified destination. 1034 * 1035 * @param tr The SIP transport to be used. 1036 * @param tdata Transmit data buffer containing SIP message. 1037 * @param addr Destination address. 1038 * @param addr_len Length of destination address. 1039 * @param token Arbitrary token to be returned back to callback. 1040 * @param cb Optional callback to be called to notify caller about 1041 * the completion status of the pending send operation. 1042 * 1043 * @return If the message has been sent successfully, this function 1044 * will return PJ_SUCCESS and the callback will not be 1045 * called. If message cannot be sent immediately, this 1046 * function will return PJ_EPENDING, and application will 1047 * be notified later about the completion via the callback. 1048 * Any statuses other than PJ_SUCCESS or PJ_EPENDING 1049 * indicates immediate failure, and in this case the 1050 * callback will not be called. 1009 1051 */ 1010 1052 PJ_DECL(pj_status_t) pjsip_transport_send( pjsip_transport *tr, … … 1017 1059 1018 1060 /** 1061 * This is a low-level function to send raw data using the specified transport 1062 * to the specified destination. 1063 * 1064 * @param tr The SIP transport to be used. 1065 * @param raw_data The data to be sent. 1066 * @param data_len The length of the data. 1067 * @param addr Destination address. 1068 * @param addr_len Length of destination address. 1069 * @param token Arbitrary token to be returned back to callback. 1070 * @param cb Optional callback to be called to notify caller about 1071 * the completion status of the pending send operation. 1072 * 1073 * @return If the message has been sent successfully, this function 1074 * will return PJ_SUCCESS and the callback will not be 1075 * called. If message cannot be sent immediately, this 1076 * function will return PJ_EPENDING, and application will 1077 * be notified later about the completion via the callback. 1078 * Any statuses other than PJ_SUCCESS or PJ_EPENDING 1079 * indicates immediate failure, and in this case the 1080 * callback will not be called. 1081 */ 1082 PJ_DECL(pj_status_t) pjsip_transport_send_raw(pjsip_transport *tr, 1083 const void *raw_data, 1084 pj_size_t data_len, 1085 const pj_sockaddr_t *addr, 1086 int addr_len, 1087 void *token, 1088 pjsip_tp_send_callback cb); 1089 1090 1091 /** 1019 1092 * @} 1020 1093 */
Note: See TracChangeset
for help on using the changeset viewer.