SocketLibrary.Packets.Packet.GetData C# (CSharp) Method

GetData() public method

Gets the data in this packet, excluding the header.
public GetData ( ) : byte[]
return byte[]
        public byte[] GetData()
        {
            return this.data.ToArray();
        }

Usage Example

示例#1
0
 /// <summary>
 /// Decodes a packet to a string.
 /// </summary>
 /// <param name="p">The packet to decode.</param>
 /// <returns>The string containing the information that was contained in the packet. </returns>
 public static String DecodePacketString(Packet p, int index)
 {
     String result = "";
     byte[] data = p.GetData();
     for( int i = index; i < data.Length; i++){
         result += ((char)data[i]) + "";
     }
     return result;
 }
All Usage Examples Of SocketLibrary.Packets.Packet::GetData