37 static const char* tcp_str =
"tcp";
113 ssize_t received = 0;
120 if (received == -1) {
121 if (errno == EAGAIN || errno == EINTR) {
125 if (errno != ECONNRESET) {
131 }
else if (received == 0) {
144 ods_log_error(
"[%s] packet too big, dropping connection", tcp_str);
153 if (received == -1) {
154 if (errno == EAGAIN || errno == EINTR) {
158 if (errno != ECONNRESET) {
164 }
else if (received == 0) {
191 uint16_t sendlen = htons(tcp->
msglen);
192 sent = write(tcp->
fd, (
const char*)&sendlen + tcp->
total_bytes,
195 if (errno == EAGAIN || errno == EINTR) {
213 if (errno == EAGAIN || errno == EINTR) {
238 if (!conn || !allocator) {
254 if (!
set || !allocator) {
258 tcp_conn_cleanup(set->tcp_conn[i], allocator);