MCPcopy Create free account
hub / github.com/acl-dev/acl / reply_client

Function reply_client

lib_acl/samples/vstream/main.cpp:34–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34static void reply_client(ACL_VSTREAM *client)
35{
36#define COUNT 10
37#define SIZE 8192000
38 const char *myname = "reply_client";
39 struct iovec vector[COUNT];
40 int i, dlen = 0, n;
41
42 for (i = 0; i < COUNT; i++) {
43#ifdef MINGW
44 vector[i].iov_base = (char*) acl_mycalloc(1, SIZE);
45#else
46 vector[i].iov_base = acl_mycalloc(1, SIZE);
47#endif
48 assert(vector[i].iov_base);
49 vector[i].iov_len = SIZE;
50 dlen += SIZE;
51 }
52
53 printf("%s: before write\n", myname);
54 n = acl_vstream_writevn(client, vector, COUNT);
55
56 for (i = 0; i < COUNT; i++) {
57 acl_myfree(vector[i].iov_base);
58 }
59
60 printf("%s: writen n = %d, dlen = %d\r\n", myname, n, dlen);
61}
62
63static int vstream_server(void)
64{

Callers 1

vstream_serverFunction · 0.70

Calls 1

acl_vstream_writevnFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…