Add support for listening sockets for outgoing data.

This commit is contained in:
Ian Gulliver
2016-02-17 13:56:13 -08:00
parent 7f8b92deaf
commit 908a364aef
7 changed files with 55 additions and 18 deletions

View File

@@ -77,6 +77,11 @@ void client_add(int fd, struct serializer *serializer) {
fprintf(stderr, "C %s (%s): New client\n", client->id, serializer->name);
}
void client_new_fd(int fd, int epoll_fd, void *passthrough) {
struct serializer *serializer = (struct serializer *) passthrough;
client_add(fd, serializer);
}
void client_write(struct packet *packet) {
for (int i = 0; i < NUM_SERIALIZERS; i++) {
struct serializer *serializer = &serializers[i];