MCPcopy Create free account
hub / github.com/alibaba/PhotonLibOS / chunked_handler_debug

Function chunked_handler_debug

net/http/test/client_function_test.cpp:428–443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426292};
427
428int chunked_handler_debug(void*, ISocketStream* sock) {
429 EXPECT_NE(nullptr, sock);
430 LOG_DEBUG("Accepted");
431 char recv[4096];
432 auto len = sock->recv(recv, 4096);
433 EXPECT_GT(len, 0);
434 auto ret = sock->write(header_data, sizeof(header_data) - 1);
435 EXPECT_EQ(sizeof(header_data) - 1, ret);
436 auto offset = 0;
437 for (auto &a : wa_test) {
438 chunked_send(offset, a, sock);
439 offset += a;
440 }
441 sock->write("0\r\n\r\n", 5);
442 return 0;
443}
444
445TEST(http_client, debug) {
446 auto server = new_tcp_socket_server();

Callers

nothing calls this directly

Calls 3

chunked_sendFunction · 0.70
recvMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected