user_list.c: Simplify populate_user_list().
[paraslash.git] / send.h
diff --git a/send.h b/send.h
index 94d8afd82e1c40bbacfdbf501c951e08551362d4..69ebd377e0ea27c46932a1a1e5456349e9787360 100644 (file)
--- a/send.h
+++ b/send.h
@@ -87,3 +87,24 @@ struct sender {
         */
        int (*client_cmds[NUM_SENDER_CMDS])(struct sender_command_data*);
 };
+
+/** Describes one client, connected to a paraslash sender. */
+struct sender_client {
+       /** The file descriptor of the client. */
+       int fd;
+       /** The socket "name" of the client. */
+       char *name;
+       /** The position of this client in the client list. */
+       struct list_head node;
+       /** Non-zero if audio file header has been sent. */
+       int header_sent;
+       /** The list of pending chunks for this client. */
+       struct chunk_queue *cq;
+       /** Data specific to the particular sender. */
+       void *private_data;
+};
+
+int open_sender(unsigned l4type, int port);
+void shutdown_client(struct sender_client *sc);
+void send_chunk(struct sender_client *sc, size_t max_bytes_per_write,
+               long unsigned current_chunk, const char *buf, size_t len);