| 130 | } |
| 131 | |
| 132 | int net_send(int fd, const char *buf, int len) |
| 133 | { |
| 134 | const char *p = buf; |
| 135 | int res; |
| 136 | |
| 137 | do { |
| 138 | res = send(fd, p, len, 0); |
| 139 | if (res <= 0) |
| 140 | return res; |
| 141 | len -= res; |
| 142 | p += res; |
| 143 | } while (len); |
| 144 | |
| 145 | return (p - buf); |
| 146 | } |
| 147 | |
| 148 | int net_printf(int fd, char *format, ...) |
| 149 | { |
no outgoing calls
no test coverage detected