(str)
| 362 | build_addr(log_sock_addr_store, AF_INET, LOG_NET_PORT, NET_ADDR); |
| 363 | |
| 364 | async function log_net(str) { |
| 365 | let str_buf = p.stringify(str + "\n"); |
| 366 | |
| 367 | if (log_sock_connected == 0) { |
| 368 | await chain.add_syscall(SYSCALL_CONNECT, log_sock_fd, log_sock_addr_store, 0x10); |
| 369 | log_sock_connected = 1; |
| 370 | } |
| 371 | |
| 372 | await chain.add_syscall(SYSCALL_WRITE, log_sock_fd, str_buf, str_buf.backing.byteLength); |
| 373 | await chain.run(); |
| 374 | } |
| 375 | |
| 376 | async function log(str) { |
| 377 | if (ENABLE_NET_LOGS == 1) { |
no test coverage detected