1 #include <dragonnet/send.h>
7 bool dragonnet_send_raw(DragonnetPeer *p, bool submit, const void *buf, size_t n)
9 ssize_t len = send(p->sock, buf, n, MSG_NOSIGNAL | (submit ? 0 : MSG_MORE));
12 if (errno == ECONNRESET || errno == EPIPE || errno == ETIMEDOUT) {
13 shutdown(p->sock, SHUT_RDWR);
14 pthread_mutex_unlock(&p->mtx);
23 pthread_mutex_unlock(&p->mtx);