public void doSend(UDTPacket packet) { try { byte[] data = packet.getEncoded(); byte[] dgp = packet.getSession().getDatagram(); this.dgSocket.SendTo(dgp, Remote); } catch { } }
/// <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); } }