using System;
using LeanCloud.Realtime.Internal;
namespace LeanCloud.Realtime
{
///
/// 基于二进制数据的消息类型,可以直接发送 Byte 数组
///
[AVIMMessageClassName("_AVIMBinaryMessage")]
public class AVIMBinaryMessage : AVIMMessage
{
///
/// Initializes a new instance of the class.
///
public AVIMBinaryMessage()
{
}
///
/// create new instance of AVIMBinnaryMessage
///
///
public AVIMBinaryMessage(byte[] data)
{
this.BinaryData = data;
}
///
/// Gets or sets the binary data.
///
/// The binary data.
public byte[] BinaryData { get; set; }
internal override MessageCommand BeforeSend(MessageCommand cmd)
{
var result = base.BeforeSend(cmd);
result = result.Binary(this.BinaryData);
return result;
}
}
}