tModLoader v2024.10
A mod to make and play Terraria mods
NetManager Class Reference

Public Member Functions

void Broadcast (NetPacket packet, BroadcastCondition conditionToBroadcast, int ignoreClient=-1)
 
void Broadcast (NetPacket packet, int ignoreClient=-1)
 
delegate bool BroadcastCondition (int clientIndex)
 
void BroadcastOrLoopback (NetPacket packet)
 
ushort GetId< T > ()
 
NetModule GetModule< T > ()
 
void Read (BinaryReader reader, int userId, int readLength)
 
void Register< T > ()
 
void SendToClient (NetPacket packet, int playerId)
 
void SendToSelf (NetPacket packet)
 
void SendToServer (NetPacket packet)
 
void SendToServerAndSelf (NetPacket packet)
 
void SendToServerOrLoopback (NetPacket packet)
 

Static Public Member Functions

static void SendCallback (object state)
 

Static Public Attributes

static readonly NetManager Instance = new NetManager()
 

Member Function Documentation

◆ GetId< T >()

ushort NetManager.GetId< T > ( )
Type Constraints
T :NetModule 
T :PacketTypeStorage<T> 
T :Id 

◆ GetModule< T >()

NetModule NetManager.GetModule< T > ( )
Type Constraints
T :NetModule 
T :PacketTypeStorage<T> 
T :Module 

◆ Register< T >()

void NetManager.Register< T > ( )
Type Constraints
T :NetModule 
T :new()