- int fd, ret = para_listen(AF_UNSPEC, l4type, port);
+ int fd, ret = para_listen_simple(l4type, port);
-int send_queued_chunks(int fd, struct chunk_queue *cq,
- size_t max_bytes_per_write)
+int send_queued_chunks(int fd, struct chunk_queue *cq)
* \param current_chunk The number of the chunk to write.
* \param buf The data to write.
* \param len The number of bytes of \a buf.
* \param current_chunk The number of the chunk to write.
* \param buf The data to write.
* \param len The number of bytes of \a buf.
* written, the remainder is put into the chunk queue for that client.
*/
void send_chunk(struct sender_client *sc, struct sender_status *ss,
* written, the remainder is put into the chunk queue for that client.
*/
void send_chunk(struct sender_client *sc, struct sender_status *ss,
- size_t max_bytes_per_write, long unsigned current_chunk,
- const char *buf, size_t len, const char *header_buf,
- size_t header_len)
+ long unsigned current_chunk, const char *buf, size_t len,
+ const char *header_buf, size_t header_len)
ret = queue_chunk_or_shutdown(sc, ss, buf, len);
goto out;
}
ret = queue_chunk_or_shutdown(sc, ss, buf, len);
goto out;
}
- ret = write_nonblock(sc->fd, buf, len, max_bytes_per_write);
+ ret = write_nonblock(sc->fd, buf, len);
"\tnumber of connected clients: %d\n"
"\tmaximal number of clients: %d%s\n"
"\tconnected clients: %s\n"
"\taccess %s list: %s\n",
name,
(ss->listen_fd >= 0)? "on" : "off",
"\tnumber of connected clients: %d\n"
"\tmaximal number of clients: %d%s\n"
"\tconnected clients: %s\n"
"\taccess %s list: %s\n",
name,
(ss->listen_fd >= 0)? "on" : "off",
* \sa \ref para_accept(), \ref mark_fd_nonblocking(), \ref acl_check_access(),
* \ref cq_new(), \ref add_close_on_fork_list().
*/
* \sa \ref para_accept(), \ref mark_fd_nonblocking(), \ref acl_check_access(),
* \ref cq_new(), \ref add_close_on_fork_list().
*/
- int fd, ret = para_accept(ss->listen_fd, NULL, 0);
- if (ret < 0) {
+ int fd, ret;
+
+ if (ss->listen_fd < 0)
+ return NULL;
+ ret = para_accept(ss->listen_fd, rfds, NULL, 0, &fd);
+ if (ret < 0)