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

Function pipe_init

lib_acl/samples/msg/pipeio.c:25–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23static int __server_fd[2], __client_fd[2];
24
25static void pipe_init(void)
26{
27 if (acl_duplex_pipe(__server_fd) < 0) {
28 printf("acl_duplex_pipe error(%s)\r\n", acl_last_serror());
29 exit (1);
30 }
31 if (acl_duplex_pipe(__client_fd) < 0) {
32 printf("acl_duplex_pipe error(%s)\r\n", acl_last_serror());
33 exit (1);
34 }
35 __sstream_reader = acl_vstream_fdopen(__server_fd[0], O_RDONLY, 1024, 10, ACL_VSTREAM_TYPE_SOCK);
36 __sstream_writer = acl_vstream_fdopen(__client_fd[1], O_WRONLY, 1024, 10, ACL_VSTREAM_TYPE_SOCK);
37
38 __cstream_reader = acl_vstream_fdopen(__client_fd[0], O_RDONLY, 1024, 10, ACL_VSTREAM_TYPE_SOCK);
39 __cstream_writer = acl_vstream_fdopen(__server_fd[1], O_WRONLY, 1024, 10, ACL_VSTREAM_TYPE_SOCK);
40}
41
42static void pipe_end(void)
43{

Callers 1

pipeio_runFunction · 0.85

Calls 2

acl_duplex_pipeFunction · 0.85
acl_last_serrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…