(self, status = STATUS_NORMAL, reason = "")
send close data to the server.

        status: status code to send. see STATUS_XXX.

        reason: the reason to close. This must be string.
send close data to the server.
send close data to the server .
def send_close(self, status = STATUS_NORMAL, reason = ""):
        """
        send close data to the server.

        status: status code to send. see STATUS_XXX.

        reason: the reason to close. This must be string.
        """
        if status < 0 or status >= ABNF.LENGTH_16:
            raise ValueError("code is invalid range")
        self.send(struct.pack('!H', status) + reason, ABNF.OPCODE_CLOSE)
def send_close ( self , status = STATUS_NORMAL , reason = "" ) : if status < 0 or status >= ABNF . LENGTH_16 : raise ValueError ( "code is invalid range" ) self . send ( struct . pack ( '!H' , status ) + reason , ABNF . OPCODE_CLOSE )