tModLoader v2023.01
A mod to make and play Terraria mods
Terraria.ModLoader.ModPacket Class Reference

This class inherits from BinaryWriter. This means that you can use all of its writing functions to send information between client and server. This class also comes with a Send method that's used to actually send everything you've written between client and server. More...

Inherits BinaryWriter.

Public Member Functions

void Send (int toClient=-1, int ignoreClient=-1)
 Sends all the information you've written between client and server. If the toClient parameter is non-negative, this packet will only be sent to the specified client. If the ignoreClient parameter is non-negative, this packet will not be sent to the specified client.
 

Detailed Description

This class inherits from BinaryWriter. This means that you can use all of its writing functions to send information between client and server. This class also comes with a Send method that's used to actually send everything you've written between client and server.

ModPacket has all the same methods as BinaryWriter, and some additional ones.

See also
System.IO.BinaryWriter