89 return IO_EOF; |
89 return IO_EOF; |
90 } |
90 } |
91 return r; |
91 return r; |
92 } |
92 } |
93 |
93 |
|
94 ssize_t net_write(SYS_NETFD fd, void *buf, size_t nbytes) { |
|
95 ssize_t r = ((IOStream*)fd)->write(fd, buf, nbytes); |
|
96 if(r < 0) { |
|
97 return IO_ERROR; |
|
98 } |
|
99 return r; |
|
100 } |
|
101 |
94 |
102 |
95 /* iovec buffer */ |
103 /* iovec buffer */ |
96 iovec_buf_t *iovec_buf_create(pool_handle_t *pool) { |
104 iovec_buf_t *iovec_buf_create(pool_handle_t *pool) { |
97 iovec_buf_t *buf = pool_malloc(pool, sizeof(iovec_buf_t)); |
105 iovec_buf_t *buf = pool_malloc(pool, sizeof(iovec_buf_t)); |
98 |
106 |