PacketReader Class

Provides common functionality for efficiently reading incoming network packets.

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

Syntax

public class PacketReader : BinaryReader

Remarks

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.

See Also

Tasks

Receiving Network Data

Reference

PacketReader Members
Microsoft.Xna.Framework.Net Namespace

Platforms

Xbox 360, Windows 7, Windows Vista, Windows XP