/** * platSecSocSend * * @brief The platSecSocSend() function is used to send data over a secure * socket. * * This function maps to the cprSend function for the RT/TNP implementations. * * @param[in] soc Specifies the socket created with cprSocket() to send * @param[in] buf A pointer to the buffer of the message to send. * @param[in] len Specifies the length in bytes of the message pointed to by the buffer argument. * * @return Upon successful completion, platSecSocSend() shall return the number of * bytes sent. Otherwise, SOCKET_ERROR shall be returned and cpr_errno set to * indicate the error. * * */ ssize_t platSecSocSend (cpr_socket_t soc, CONST void *buf, size_t len ) { return cprSend(soc, buf, len, 0); }
/** * sipSocketSend * * @brief The sipSocketSend() function is a wrapper used by the sipstack to send * data over a socket. This function decides to use the secure versus unsecure * connection based on the "secure" flag. * * @note - The implementation of both secure/non-secure is the same in RT/TNP * products. It is different for the other vendors and hence we need this * flexibility. * * @param[in] soc Specifies the socket created with cprSocket() to send * @param[in] buf A pointer to the buffer of the message to send. * @param[in] len Specifies the length in bytes of the message pointed to by the buffer argument. * @param[in] flags - The options used for the send. * * */ ssize_t sipSocketSend (cpr_socket_t soc, CONST void *buf, size_t len, int32_t flags, boolean secure) { // if (secure) { // return platSecSocSend (soc, buf, len); // } else { return cprSend(soc, buf, len, flags); // } }