def METHOD_NAME(self, s, wsock):
    try:
        try:
            while True:
                # at least EINTR is possible. Do our best to keep handling
                # outside the GIL in this case using sendall().
                wsock.sendall(s)
        except socket.error:
            pass
    finally:
        wsock.close()