binds and loops, waiting for a connection from a client