use select() to allow multiple clients

yeah that's right git I MOVED ALL THE FILES WITHOUT TELLING YOU