lib.connection: improving response time for incoming network packets