Lines Matching refs:buflen
141 const char *buffer, size_t buflen);
143 typedef ssize_t ws_write_payload(const unsigned char *buf, size_t buflen,
389 static ssize_t ws_cw_dec_next(const unsigned char *buf, size_t buflen, in ws_cw_dec_next() argument
399 curl_off_t remain = (payload_len - (payload_offset + buflen)); in ws_cw_dec_next()
407 *err = curl_ws_send(data, buf, buflen, &bytes, 0, CURLWS_PONG); in ws_cw_dec_next()
411 else if(buflen || !remain) { in ws_cw_dec_next()
414 payload_len, buflen); in ws_cw_dec_next()
417 (const char *)buf, buflen); in ws_cw_dec_next()
422 return (ssize_t)buflen; in ws_cw_dec_next()
641 const unsigned char *buf, size_t buflen, in ws_enc_write_payload() argument
653 len = buflen; in ws_enc_write_payload()
857 size_t buflen; member
866 static ssize_t ws_client_collect(const unsigned char *buf, size_t buflen, in ws_client_collect() argument
875 curl_off_t remain = (payload_len - (payload_offset + buflen)); in ws_client_collect()
890 *err = curl_ws_send(ctx->data, buf, buflen, &bytes, 0, CURLWS_PONG); in ws_client_collect()
897 DEBUGASSERT(ctx->buflen >= ctx->bufidx); in ws_client_collect()
898 nwritten = CURLMIN(buflen, ctx->buflen - ctx->bufidx); in ws_client_collect()
900 if(!buflen) { /* 0 length write, we accept that */ in ws_client_collect()
915 unsigned char *buf, size_t buflen, in nw_in_recv() argument
921 *err = curl_easy_recv(data, buf, buflen, &nread); in nw_in_recv()
928 size_t buflen, size_t *nread, in curl_ws_recv() argument
962 ctx.buflen = buflen; in curl_ws_recv()
1009 buflen, *nread, ws->frame.offset, ws->frame.bytesleft); in curl_ws_recv()
1053 const char *buffer, size_t buflen) in ws_send_raw_blocking() argument
1060 while(buflen) { in ws_send_raw_blocking()
1061 result = Curl_xfer_send(data, buffer, buflen, FALSE, &nwritten); in ws_send_raw_blocking()
1064 DEBUGASSERT(nwritten <= buflen); in ws_send_raw_blocking()
1066 buflen -= nwritten; in ws_send_raw_blocking()
1067 if(buflen) { in ws_send_raw_blocking()
1073 buflen); in ws_send_raw_blocking()
1095 size_t buflen, size_t *pnwritten) in ws_send_raw() argument
1104 if(!buflen) in ws_send_raw()
1115 result = ws_send_raw_blocking(data, ws, buffer, buflen); in ws_send_raw()
1122 result = Curl_senddata(data, buffer, buflen, pnwritten); in ws_send_raw()
1126 buflen, result, *pnwritten); in ws_send_raw()
1131 size_t buflen, size_t *sent, in curl_ws_send() argument
1143 buflen, fragsize, flags, data->set.ws_raw_mode); in curl_ws_send()
1173 result = ws_send_raw(data, buffer, buflen, sent); in curl_ws_send()
1180 buflen, Curl_bufq_len(&ws->sendbuf), space); in curl_ws_send()
1195 if((curl_off_t)buflen > ws->enc.payload_remain) { in curl_ws_send()
1198 buflen, ws->enc.payload_remain); in curl_ws_send()
1203 n = ws_enc_write_head(data, &ws->enc, flags, (curl_off_t)buflen, in curl_ws_send()
1210 buffer, buflen, &ws->sendbuf, &result); in curl_ws_send()
1215 while(!result && (buflen || !Curl_bufq_is_empty(&ws->sendbuf))) { in curl_ws_send()
1219 DEBUGASSERT(payload_added <= buflen); in curl_ws_send()
1223 buflen -= payload_added; in curl_ws_send()
1225 if(buflen) { in curl_ws_send()
1227 buffer, buflen, &ws->sendbuf, &result); in curl_ws_send()
1236 if(payload_added < buflen) { in curl_ws_send()
1243 else if(!buflen) { in curl_ws_send()
1264 buflen, fragsize, flags, data->set.ws_raw_mode, result, *sent); in curl_ws_send()
1362 CURL_EXTERN CURLcode curl_ws_recv(CURL *curl, void *buffer, size_t buflen, in curl_ws_recv() argument
1368 (void)buflen; in curl_ws_recv()
1375 size_t buflen, size_t *sent, in curl_ws_send() argument
1381 (void)buflen; in curl_ws_send()