Drag[en]gine Script Module DragonScript
1.21
|
Network message. More...
Public Member Functions | |
Constructors | |
NetworkMessage | new () |
Create network message. More... | |
Management | |
int | getDataLength () |
Llength of the message data. More... | |
void | clear () |
Clear message data. More... | |
FileReader | getReader () |
Get new FileReader starting reading at the start of the data. More... | |
FileWriter | getWriter (bool append) |
Get new FileWriter. More... | |
Network message.
This is a native class.
void Dragengine.Networking.NetworkMessage.clear | ( | ) |
Clear message data.
int Dragengine.Networking.NetworkMessage.getDataLength | ( | ) |
Llength of the message data.
FileReader Dragengine.Networking.NetworkMessage.getReader | ( | ) |
Get new FileReader starting reading at the start of the data.
Multiple file readers can be active on the same message at different read positions. If the data is changed while file readers are using this message file the next read calls can cause exceptions due to reading past the end of file.
FileWriter Dragengine.Networking.NetworkMessage.getWriter | ( | bool | append | ) |
Get new FileWriter.
Using multiple file writers is allowed but discouraged. Each writer maintain its own write position. If multiple writers attempt to write on the same message file the data is overwritten. If you need to use multiple file writers you have to manually move the write pointers to the right location.
If file readers are using this message file while writers change the content the next read calls can cause exceptions due to reading past the end of file.
append | If true start writing at end of data. If false resizes data to 0 bytes and starts writing. |
NetworkMessage Dragengine.Networking.NetworkMessage.new | ( | ) |
Create network message.