public static void WriteTypeLength(Enums.STUNAttribute type, ushort length, ref ByteBuffer buffer) { buffer.Put((ushort)type); buffer.Put(length); }
public static bool ReadTypeLength(ref ByteBuffer buffer, out Enums.STUNAttribute type, out ushort length) { type = (Enums.STUNAttribute)buffer.GetUShort(); length = buffer.GetUShort(); return(length <= buffer.Remaining()); }
public static void ReadTypeLength(ref ByteBuffer buffer, out Enums.STUNAttribute type, out ushort length) { type = (Enums.STUNAttribute)buffer.GetUShort(); length = buffer.GetUShort(); }