Reference Library
BncsReader Class
NamespacesAsgard5.BnetBncsReader
Completes a DataBuffer implementation with the additional data used by the BNCS protocol.
Declaration Syntax
C#Visual BasicVisual C++
public class BncsReader : DataReader
Public Class BncsReader _
	Inherits DataReader
public ref class BncsReader : public DataReader
Members
All MembersConstructorsMethodsProperties



IconMemberDescription
BncsReader(Stream)
Creates a new data reader with the specified stream as input.

BncsReader(array<Byte>[]()[][])
Creates a new data reader with the specified byte data.

Data
Gets a copy of the data used by the current instance. When overridden in a derived class, allows this class to access an alternative data source.
(Inherited from DataReader.)
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
GetHashCode()()()()
Serves as a hash function for a particular type. GetHashCode()()()() is suitable for use in hashing algorithms and data structures like a hash table.
(Inherited from Object.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
Length
Gets the length of the data.
(Overrides DataReader.Length.)
MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Packet
PacketID
Gets or sets the ID of the packet as it was specified when it was created.

Peek()()()()
Reads the next byte in the stream but does not consume it.
(Inherited from DataReader.)
PeekDwordString(Byte)
Peeks at the next possible four-byte string with the specified byte padding without advancing the index.
(Inherited from DataReader.)
ReadBoolean()()()()
Reads a boolean value from the data stream.
(Inherited from DataReader.)
ReadByte()()()()
Reads a byte value from the data stream.
(Inherited from DataReader.)
ReadByteArray(Int32)
Reads a byte array from the data stream.
(Inherited from DataReader.)
ReadCString()()()()
Reads the next C-style ASCII null-terminated string from the stream.
(Inherited from DataReader.)
ReadCString(Encoding)
Reads the next C-style null-terminated string from the stream.
(Inherited from DataReader.)
ReadData()()()()
Reads all remaining data from the stream.
(Inherited from DataReader.)
ReadDwordString(Byte)
Reads the next possible four-byte string with the specified byte padding.
(Inherited from DataReader.)
ReadInt16()()()()
Reads a signed 16-bit value from the data stream.
(Inherited from DataReader.)
ReadInt16Array(Int32)
Reads an array of signed 16-bit values from the data stream.
(Inherited from DataReader.)
ReadInt32()()()()
Reads a signed 32-bit value from the data stream.
(Inherited from DataReader.)
ReadInt32Array(Int32)
Reads an array of signed 32-bit values from the data stream.
(Inherited from DataReader.)
ReadInt64()()()()
Reads a signed 64-bit value from the data stream.
(Inherited from DataReader.)
ReadInt64Array(Int32)
Reads an array of signed 64-bit values from the data stream.
(Inherited from DataReader.)
ReadNullTerminatedByteArray()()()()
Reads a null-terminated byte array from the data stream.
(Inherited from DataReader.)
ReadPascalString()()()()
Reads the next pascal-style ASCII string from the stream.
(Inherited from DataReader.)
ReadPascalString(Encoding)
Reads the next pascal-style string from the stream.
(Inherited from DataReader.)
ReadTerminatedString(Char, Encoding)
Returns the next variable-length string with the specified terminator character.
(Inherited from DataReader.)
ReadUInt16()()()()
Reads an unsigned 16-bit value from the data stream.
(Inherited from DataReader.)
ReadUInt16Array(Int32)
Reads an array of unsigned 16-bit values from the data stream.
(Inherited from DataReader.)
ReadUInt32()()()()
Reads an unsigned 32-bit value from the data stream.
(Inherited from DataReader.)
ReadUInt32Array(Int32)
Reads an array of signed 32-bit values from the data stream.
(Inherited from DataReader.)
ReadUInt64()()()()
Reads an unsigned 64-bit value from the data stream.
(Inherited from DataReader.)
ReadUInt64Array(Int32)
Reads an array of unsigned 64-bit values from the data stream.
(Inherited from DataReader.)
ReadWidePascalString()()()()
Reads the next wide-pascal-style string from the stream.
(Inherited from DataReader.)
ReadWidePascalString(Encoding)
Reads the next wide-pascal-style string from the stream.
(Inherited from DataReader.)
Seek(Int32)
Checks to see whether the offset from the current position lies within the stream and, if so, advances to that position relative to the current location.
(Inherited from DataReader.)
ToString()()()()
Gets a hex representation of this data.
(Overrides DataReader.ToString()()()().)
Remarks

When using this class with a Stream, the BncsReader only takes the next packet's data off of the stream. An ideal example of this would be when using a NetworkSteam to connect to Battle.net. Incidentally, this constructor and method will block execution until new data has arrived. Therefore, if your main receiving loop is going to use these methods, it should be on a background worker loop.

Inheritance Hierarchy
Object
DataReader
 BncsReader

Assembly: Asgard5Library (Module: Asgard5Library)