| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| gamedev:dnp [2024/11/26 17:13] – [Long link state] dragonlord | gamedev:dnp [2026/04/10 19:09] (current) – [Drag[en]gine Network Protocol Specification] dragonlord |
|---|
| |
| <WRAP center round important 60%> | <WRAP center round important 60%> |
| Network protocols typically use //Network Byte Order// as defined by the TCP standard which is //Big Endian//. The message writing and reading of DNP is implemented to match Drag[en]gine #@LinkApiDocDE2_HTML~classdecBaseFileReader.html,File Reader/Writer~@# system. This allows all data written by game scripts to be stored to file, written to memory and transmitted across the network without changing the data. Since this system uses //Little Endian// DNP uses //Little Endian// too. Hence throughout this specification //Little Endian// byte ordering is used unless marked otherwise. | Network protocols typically use //Network Byte Order// as defined by the TCP standard which is //Big Endian//. The message writing and reading of DNP is implemented to match Drag[en]gine #@LinkApiDocDE2_HTML~classdecBaseFileReader.html,File Reader/Writer~@# system. This allows all data written by game scripts to be stored to file, written to memory and transmitted across the network without changing the data. Since this system uses //Little Endian// DNP uses //Little Endian// too. |
| | |
| | Hence throughout this specification **__Little Endian__** byte ordering is used unless marked otherwise. |
| </WRAP> | </WRAP> |
| |
| * ''2'': Message is the last part of the original message. | * ''2'': Message is the last part of the original message. |
| </WRAP> | | </WRAP> | |
| | [[#data_types|Byte]][*] | Data | Message data. The length of the data is the remaining count of bytes in the UDP package. | | | [[#data_types|Byte]][*] | Data | Next message data. The length of the data is the remaining count of bytes in the UDP package. | |
| |
| ===== Long link state ===== | ===== Long link state ===== |
| * ''4'': Message is the last part of the original link state. | * ''4'': Message is the last part of the original link state. |
| </WRAP> | | </WRAP> | |
| | [[#data_types|UInt16]] | MessageLength | Length of message in bytes. | | | [[#data_types|UInt16]] | MessageLength | Length of next message data in bytes. | |
| | [[#data_types|Byte]][MessageLength] | Message | Message data. | | | [[#data_types|Byte]][MessageLength] | Message | Next message data. | |
| | [[#data_types|UInt16]] | ValueCount | Count of values. | | | [[#data_types|UInt16]] | ValueCount | Count of next values. | |
| | ValueData[ValueCount] | Values | Initial value of all values in the state. | | | ValueData[ValueCount] | Values | Initial value of all next values in the state. | |
| |
| ValueData has this format: | ValueData has this format: |