Packet
A class in Root.Township, Alta.Networking.Internal.
An outgoing packet buffer that several messages are written into, each with a 2-byte length, before it is sent on a connection.
- Listed in Networking and servers
Constructors
| Member | What it is |
|---|---|
Packet(int size) | Creates a Packet from size. |
Fields
3 private and internal fields
Properties
1 private and internal property
Methods
| Member | What it is |
|---|---|
bool HasSpace(int byteCount) | True if that many more bytes fit. |
void Reset() | Clears the packet for reuse. |
bool Send(Connection connection, ConnectionChannel channel) | Sends the packet on the connection and channel. Resets it on success, or always on unreliable channels. |
void Write(StreamWriter writer, int byteCount) | Appends a message: its byte length, then its bytes. |
Used in
Members of other types that take, return or hold a Packet: