示例#1
0
 public Task <int> SendPacketAsync(string signature)
 {
     if (OutFormat == null)
     {
         throw new NullReferenceException("Outgoing format cannot be null.");
     }
     return(SendAsync(HPacket.ToBytes(OutFormat, signature)));
 }
示例#2
0
        public DataInterceptedEventArgs(HPacket packet, int step, bool isOutgoing)
        {
            _ogData   = packet.ToBytes();
            _ogString = packet.ToString();

            Step       = step;
            Packet     = packet;
            IsOutgoing = isOutgoing;
            Timestamp  = DateTime.Now;
        }
示例#3
0
 public Task <int> SendToServerAsync(HPacket packet)
 {
     return(SendToServerAsync(packet.ToBytes()));
 }
示例#4
0
 public Task <int> SendToClientAsync(HPacket packet)
 {
     return(SendToClientAsync(packet.ToBytes()));
 }
示例#5
0
文件: HNode.cs 项目: xnumad/Sulakore
 public ValueTask <int> SendAsync(HPacket packet)
 {
     return(SendAsync(packet.ToBytes()));
 }