tModLoader v2023.01
A mod to make and play Terraria mods
Terraria.Net.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 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 Terraria.Net.NetManager.GetId< T > ( )
Type Constraints
T :NetModule 
T :PacketTypeStorage<T> 
T :Id 

◆ GetModule< T >()

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

◆ Register< T >()

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