Lines Matching refs:amount

145 	size_t amount;  in how_much_to_send()  local
148 amount = sys_rand32_get() % max_len; in how_much_to_send()
149 } while (amount == 0U); in how_much_to_send()
151 return amount; in how_much_to_send()
165 static void recv_data_wso_api(int sock, size_t amount, uint8_t *buf, in recv_data_wso_api() argument
197 if (remaining != 0 || total_read != amount || in recv_data_wso_api()
199 memcmp(lorem_ipsum, buf, amount - 1) != 0) { in recv_data_wso_api()
201 proto, amount, total_read, remaining); in recv_data_wso_api()
209 static void recv_data_bsd_api(int sock, size_t amount, uint8_t *buf, in recv_data_bsd_api() argument
215 remaining = amount; in recv_data_bsd_api()
237 memcmp(lorem_ipsum, buf, amount - 1) != 0) { in recv_data_bsd_api()
239 proto, amount, read_pos, remaining); in recv_data_bsd_api()
247 static bool send_and_wait_msg(int sock, size_t amount, const char *proto, in send_and_wait_msg() argument
261 memcpy(buf, lorem_ipsum, amount); in send_and_wait_msg()
262 buf[amount] = '\n'; in send_and_wait_msg()
270 ret = sendall_with_ws_api(sock, buf, amount + 1); in send_and_wait_msg()
272 ret = sendall_with_bsd_api(sock, buf, amount + 1); in send_and_wait_msg()
289 recv_data_wso_api(sock, amount + 1, buf, buf_len, proto); in send_and_wait_msg()
291 recv_data_bsd_api(sock, amount + 1, buf, buf_len, proto); in send_and_wait_msg()
311 size_t amount; in main() local
391 amount = how_much_to_send(ipsum_len); in main()
394 !send_and_wait_msg(websock4, amount, "IPv4", in main()
400 !send_and_wait_msg(websock6, amount, "IPv6", in main()