共用方式為


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)

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

How To: Receive Data

Reference

PacketReader Members
Microsoft.Xna.Framework.Net Namespace

Platforms

Xbox 360, Windows XP SP2, Windows Vista, Zune