@classmethod
def WrapAndSendPayload(cls, socket, payload):
    '\n        Send payload, true if success, false if failed\n        '
    try:
        wbufsize = (- 1)
        socket_message = SocketMessage(payload)
        wfile = socket.makefile('wb', wbufsize)
        wfile.write(struct.pack(fmt, socket_message.magic))
        wfile.write(struct.pack(fmt, socket_message.payload_size))
        wfile.write(payload)
        wfile.flush()
        wfile.close()
        return True
    except Exception as e:
        _L.error('Fail to send message %s', e)
        return False
Send payload, true if success, false if failed
@classmethod
def WrapAndSendPayload(cls, socket, payload):
    '\n        \n        '
    try:
        wbufsize = (- 1)
        socket_message = SocketMessage(payload)
        wfile = socket.makefile('wb', wbufsize)
        wfile.write(struct.pack(fmt, socket_message.magic))
        wfile.write(struct.pack(fmt, socket_message.payload_size))
        wfile.write(payload)
        wfile.flush()
        wfile.close()
        return True
    except Exception as e:
        _L.error('Fail to send message %s', e)
        return False