/// <summary> /// 发送消息时 /// </summary> /// <param name="e"></param> public void OnSend(QQSendEventArgs e) { if (QQGlobal.DebugLog) { MessageLog($"发送数据:{Util.ToHex(e.byteBuffer.ToArray())}"); } EventSend?.Invoke(this, e); }
public void Send(byte[] byteBuffer) { new Task(() => { Server.SendTo(byteBuffer, Point); //发送数据时出发事件 QQSendEventArgs SendEvent = new QQSendEventArgs(this, byteBuffer); OnSend(SendEvent); }).Start(); }
public void Send(ByteBuffer byteBuffer) { new Task(() => { byte[] sendBytes = byteBuffer.ToByteArray(); Server.SendTo(sendBytes, Point); //发送数据时出发事件 QQSendEventArgs SendEvent = new QQSendEventArgs(this, byteBuffer); OnSend(SendEvent); }).Start(); }