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

Function echo

lib_acl/samples/server1/main.cpp:5–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#pragma comment(lib, "wsock32")
4
5static void echo(ACL_VSTREAM *client)
6{
7 int ret;
8 char buf[1024];
9
10 while (1) {
11 ret = acl_vstream_gets(client, buf, sizeof(buf));
12 if (ret == ACL_VSTREAM_EOF) {
13 break;
14 }
15
16 //ret = acl_vstream_fprintf(client, "hello world\r\nhello world\r\nhello world\r\n");
17 ret = acl_vstream_fprintf(client, "hello world\r\n");
18 if (ret == ACL_VSTREAM_EOF)
19 break;
20 }
21}
22
23int main(int argc, char *argv[])
24{

Callers 1

mainFunction · 0.70

Calls 2

acl_vstream_getsFunction · 0.85
acl_vstream_fprintfFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…