PacketReader Class

Provides common functionality for efficiently reading incoming network packets.

Namespace: Microsoft.Xna.Framework.Net
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

public class PacketReader : BinaryReader

Commonly, your multiplayer game should create a single PacketReader instance at startup and then reuse it whenever a packet needs to be read. To read the packet, pass the PacketReader instance to ReceiveData and then use various Read methods to extract the data.

Xbox 360, Windows XP SP2, Windows Vista, Zune

Community Additions