| 23 | static int __server_fd[2], __client_fd[2]; |
| 24 | |
| 25 | static 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 | |
| 42 | static void pipe_end(void) |
| 43 | { |
no test coverage detected
searching dependent graphs…