DamExchange Protocol Basics
The interface between two Draughts computer programs is
implemented in a two layer structure. Layer 1 offers reliable
interchange of messages between the two Draughts computer
programs. Layer 2 describes the contents of the exchanged
messages.
The layer 1 protocol can, in
principle, be replaced by any protocol that is able to reliably
exchange messages between two computer programs. However, to be
able to communicate between two computer programs, they both
should of course use the same layer 1 protocol.
In DamExchange, two layer 1 protocols are defined so
far: the NULMODEM and the SOCKET protocol (IPv4 and IPv6). The description
of the NULMODEM protocol contains pseudo code to ease
implementation.
The layer 2 protocol (DamExchange
messages) is fixed and independent of the chosen underlying layer
1 protocol. DamExchange is designed in such a way that it can be
extended to future enhancements or changes.
For Draughts computer programs running in Windows 7 / 8.1 / 10 / 11 a DLL (with accompanying header file) containing
the layer 1 and 2 protocols, is available for download.
Design criteria for DamExchange:
- The DamExchange messages (layer 2) should be independent
of the hardware platform or machine-specific encoding.
Also alignment or byte ordering (big endian vs. little
endian) should not be an issue. Because of these design
criteria, the Draughts computer programs exchange
messages based only on the ASCII character set with
values 1 up to and including 127.
- The layer 1 protocol should be able to send messages of 1
to 127 characters in length.
- The content and format of the DamExchange messages (layer
2) should be independent of the underlying layer 1
protocol.
- The layer 2 protocol (DamExchange messages) assumes
correct implementation of the protocol in both
communicating computer programs. I.e. the layer 2
protocol implementation should not try to detect or fix
implementation errors in the other computer program. Also
the layer 2 implementation should not try to detect or
fix communication errors in layer 1. Reliable
communication in layer 1 should be assumed in layer 2.
- The DamExchange protocol should be suitable to play a
computer Draughts tournament with a DamExchange
Tournament Server as Initiator. All (simultaneously)
connected Draughts computer programs act as Followers.
The DamExchange Tournament Server is outside the scope of
this document.
DamExchange Home