def server(self):
        """Creates and returns a ServerConnection object."""

        conn = self.connection_class(self)
        with self.mutex:
            self.connections.append(conn)
        return conn
Creates and returns a ServerConnection object.