|
|
@ -301,14 +301,11 @@ static void server_recv_cb(EV_P_ ev_io *w, int revents) |
|
|
|
endpoints.sae_dstaddr = (struct sockaddr*)&(remote->addr); |
|
|
|
endpoints.sae_dstaddrlen = remote->addr_len; |
|
|
|
|
|
|
|
struct iovec iov; |
|
|
|
iov.iov_base = remote->buf->array; |
|
|
|
iov.iov_len = remote->buf->len; |
|
|
|
size_t len; |
|
|
|
int s = connectx(remote->fd, &endpoints, SAE_ASSOCID_ANY, CONNECT_DATA_IDEMPOTENT, |
|
|
|
&iov, 1, &len, NULL); |
|
|
|
int s = connectx(remote->fd, &endpoints, SAE_ASSOCID_ANY, |
|
|
|
CONNECT_RESUME_ON_READ_WRITE | CONNECT_DATA_IDEMPOTENT, |
|
|
|
NULL, 0, NULL, NULL); |
|
|
|
if (s == 0) { |
|
|
|
s = len; |
|
|
|
s = send(remote->fd, remote->buf->array, remote->buf->len, 0); |
|
|
|
} |
|
|
|
#else |
|
|
|
int s = sendto(remote->fd, remote->buf->array, remote->buf->len, MSG_FASTOPEN, |
|
|
|