diff options
author | June McEnroe <june@causal.agency> | 2019-10-22 22:49:05 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-10-22 22:49:05 -0400 |
commit | 72cee2b26449468734de68c797d0cc6945f176f9 (patch) | |
tree | e89834666eef7a5615cfc8857c3592d2aa37bfec /bounce.c | |
parent | Mention server-time in manual page (diff) | |
download | pounce-72cee2b26449468734de68c797d0cc6945f176f9.tar.gz pounce-72cee2b26449468734de68c797d0cc6945f176f9.zip |
Implement serverLogin
Diffstat (limited to '')
-rw-r--r-- | bounce.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bounce.c b/bounce.c index b3d8b33..43d3ef8 100644 --- a/bounce.c +++ b/bounce.c @@ -20,6 +20,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <sys/socket.h> #include <sysexits.h> #include <tls.h> #include <unistd.h> @@ -91,6 +92,15 @@ int main(int argc, char *argv[]) { int bind[BindCap]; size_t bindLen = listenBind(bind, BindCap, localHost, localPort); + int server = serverConnect(host, port); + serverLogin(pass, auth, nick, user, real); + + // TODO: Wait for successful login before listening. + for (size_t i = 0; i < bindLen; ++i) { + int error = listen(bind[i], 1); + if (error) err(EX_IOERR, "listen"); + } + // Wishing for struct-of-arrays... struct pollfd fds[BindCap]; for (size_t i = 0; i < bindLen; ++i) { |