示例#1
0
 public void doSend(UDTPacket packet)
 {
     try
     {
         byte[] data = packet.getEncoded();
         byte[] dgp  = packet.getSession().getDatagram();
         this.dgSocket.SendTo(dgp, Remote);
     }
     catch
     { }
 }
示例#2
0
 /// <summary>
 /// 发送udp数据包
 /// </summary>
 /// <param name="packet"></param>
 public void doSend(UDTPacket packet)
 {
     try
     {
         byte[]     data = packet.getEncoded();
         IPEndPoint dgp  = packet.getSession().getDatagram();
         this.SendInternal(data, dgp);
     }
     catch (Exception exc)
     {
         Log.Write(this.ToString(), "send data err", exc);
     }
 }