src/client.c
/** Send all the clear text data and return 0 on success */
Send all the clear text data and return 0 on success
Send all the clear text data and return 0 on success
int c_send_data(client_st *p, const unsigned char *buf, unsigned int in_len)
{
    unsigned int len = in_len;
    int rv;
    ASSERT(p->state != CLIENT_CLOSING);
    while (len) {
        if (p->is_tls) {
            rv = tls_write(p, buf, len);
        }
        else if (p->is_ws) {
            rv = c_send_data_ws(p, buf, len);
        }
        else {
            rv = c_send_data_wire(p, buf, len);
        }
        if (rv <= 0) {
            return 1;
        }
        len -= rv;
    }
    return 0;
}
int c_send_data ( client_st * p , const unsigned char * buf , unsigned int in_len ) { unsigned int len = in_len ; int rv ; ASSERT ( p -> state != CLIENT_CLOSING ) ; while ( len ) { if ( p -> is_tls ) { rv = tls_write ( p , buf , len ) ; } else if ( p -> is_ws ) { rv = c_send_data_ws ( p , buf , len ) ; } else { rv = c_send_data_wire ( p , buf , len ) ; } if ( rv <= 0 ) { return 1 ; } len -= rv ; } return 0 ; }
Send all the clear text data and return 0 on success
Send all the clear text data and return 0 on success