|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSystem.IO.BinaryWriter
Microsoft.Xna.Framework.Net.PacketWriter
public class PacketWriter
Provides common functionality for efficiently formatting outgoing network packets. Reference page contains links to related code samples.
Field Summary |
---|
Fields inherited from class System.IO.BinaryWriter |
---|
Null, OutStream |
Constructor Summary | |
---|---|
PacketWriter()
Initializes an empty instance of PacketWriter. |
|
PacketWriter(int capacity)
Initializes a new instance of PacketWriter with the specified capacity. |
Method Summary | |
---|---|
int |
getPosition()
Gets the current packet write position. |
int |
Length()
Gets the length of the packet being written. |
void |
setPosition(int value)
Sets the current packet write position. |
void |
Write(Color value)
Writes a Color value to an outgoing network packet. |
void |
Write(double value)
Writes a Double value to an outgoing network packet. |
void |
Write(float value)
Writes a Single value to an outgoing network packet. |
void |
Write(Matrix value)
Writes a Matrix value to an outgoing network packet. |
void |
Write(Quaternion value)
Writes a Quaternion value to an outgoing network packet. |
void |
Write(Vector2 value)
Writes a Vector2 value to an outgoing network packet. |
void |
Write(Vector3 value)
Writes a Vector3 value to an outgoing network packet. |
void |
Write(Vector4 value)
Writes a Vector4 value to an outgoing network packet. |
Methods inherited from class System.IO.BinaryWriter |
---|
Close, Dispose, Dispose, Flush, getBaseStream, Write, Write, Write, Write, Write, Write, Write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PacketWriter()
public PacketWriter(int capacity)
capacity
- Capacity for the packet writer.Method Detail |
---|
public int Length()
public int getPosition()
public void setPosition(int value)
public void Write(Color value)
value
- Value to be written.public void Write(Matrix value)
value
- Value being written.public void Write(Quaternion value)
value
- Value being written.public void Write(Vector2 value)
value
- Value being written.public void Write(Vector3 value)
value
- Value being written.public void Write(Vector4 value)
value
- Value being written.public void Write(double value)
value
- Value to be written.public void Write(float value)
value
- Value to be written.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |