From 72cee2b26449468734de68c797d0cc6945f176f9 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Tue, 22 Oct 2019 22:49:05 -0400 Subject: Implement serverLogin --- bounce.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'bounce.c') diff --git a/bounce.c b/bounce.c index b3d8b33..43d3ef8 100644 --- a/bounce.c +++ b/bounce.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -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) { -- cgit 1.4.1