int lwip_send(int s, const void *mem, int size, unsigned int flags) { s = sock_for_fd(s); if (s < 0) { errno = EBADF; return -1; } return send_common(s, mem, size, flags); }
static ssize_t lwip_vfs_write(void * hnd, const void * buffer, size_t cnt) { int s = ((int)hnd) - 1; return send_common(s, buffer, cnt, 0); }
void send(const Message& packet, send_handler handle_send) { send_common(create_raw_message(packet), handle_send); }