PacketReader Class

Provides common functionality for efficiently reading incoming network packets.

Namespace: Microsoft.Xna.Framework.Net
Assembly: Microsoft.Xna.Framework.Net (in

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 7, Windows Vista, Windows XP

Community Additions