Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
NetModule.cs
Go to the documentation of this file.
1using System.IO;
2
3namespace Terraria.Net;
4
5public abstract class NetModule
6{
7 public abstract bool Deserialize(BinaryReader reader, int userId);
8
9 protected static NetPacket CreatePacket<T>(int maxSize) where T : NetModule
10 {
11 ushort id = NetManager.Instance.GetId<T>();
12 return new NetPacket(id, maxSize);
13 }
14}
static readonly NetManager Instance
Definition NetManager.cs:18
static NetPacket CreatePacket< T >(int maxSize)
Definition NetModule.cs:9
bool Deserialize(BinaryReader reader, int userId)