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