summaryrefslogtreecommitdiff
path: root/src/clients.h
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2010-11-27 06:50:41 +0000
committerChristian Pointner <equinox@spreadspace.org>2010-11-27 06:50:41 +0000
commitdcf62b0ecc7c3459badd4a67c85d328220a95d31 (patch)
tree6456dfe8b93fa2dfb4631191519c510c5b3975af /src/clients.h
parentadded initial (not working) version of client list (diff)
one side of cleint connections works for recv
git-svn-id: https://svn.spreadspace.org/tcpproxy/trunk@11 e61f0598-a718-4e21-a8f0-0aadfa62ad6b
Diffstat (limited to 'src/clients.h')
-rw-r--r--src/clients.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/clients.h b/src/clients.h
index ced5f16..9ab8f0c 100644
--- a/src/clients.h
+++ b/src/clients.h
@@ -34,7 +34,7 @@
#include "tcp.h"
typedef struct {
- int fd_;
+ int fd_[2];
// TODO: add info for each client and write buffers
} client_t;
@@ -44,7 +44,7 @@ typedef slist_t clients_t;
int clients_init(clients_t* list);
void clients_clear(clients_t* list);
-int clients_add(clients_t* list, int fd, tcp_endpoint_t remote_end);
+int clients_add(clients_t* list, int fd, const tcp_endpoint_t* remote_end);
void clients_remove(clients_t* list, int fd);
client_t* clients_find(clients_t* list, int fd);
void clients_print(clients_t* list);
@@ -52,4 +52,7 @@ void clients_print(clients_t* list);
void clients_read_fds(clients_t* list, fd_set* set, int* max_fd);
void clients_write_fds(clients_t* list, fd_set* set, int* max_fd);
+int clients_read(clients_t* list, fd_set* set);
+int clients_write(clients_t* list, fd_set* set);
+
#endif