Difference between revisions of "GeometryServiceNetworkProtocol"
(Enter more of the libPKG header use description.)
(Define libPKG header components)
|Line 76:||Line 76:|
Revision as of 09:17, 24 January 2011
|The Geometry Service Network (GSNet) Protocol is a TCP/IP based protocol designed to facilitate socketed communications between Geometry Service Nodes on a network. A Geometry Service Node is defined as any softwares that supports communication via the GSNet Protocol.
GSNet Msg (Visual) Breakdown
The header of the GSNet Msg contains the information necessary for quickly determining authenticity, type and length. Geometry Service's network library, libNetwork, is built upon BRL-CAD's networking library: libPKG. This causes the header byte layout to look like this:
|Magic1||int16 (2 Bytes)||Always 0x41FE|
|Magic2||int16 (2 Bytes)||Always 0x5309|
|MessageLength||int32 (4 bytes)|
|MsgType||int16 (2 bytes)|
|MessageUUID||String (Variable bytes)|
|HasRegardingUUID||Boolean (1 byte)|
|RegardingMessageUUID||String (Variable bytes)|
Due to some C and C++ incompatibilities, the libPKG "Type" parameter is used as "Magic2" in the GSNet Protocol. To address this change, NetMsg routing should be performed on the "GS Msg Type" parameter rather than the "libPKG Type" parameter.
Table showing modifications described above:
|libPKG element||GSNet element|
- Magic01: 2 bytes of data designed to ensure integrity of data and mark NetMsg starting point.
- Magic02: 2 bytes of data designed to ensure integrity of data and mark NetMsg starting point.
- Length: 4 byte integer that represents the number of bytes in the message from the end of this value to the end.
List of NetMsgTypes.
List of Common NetMsg Exchanges