view docs/extension-pingpong.txt @ 11:38184ef1296d

Make TIME call agree with spec Time call spec wants months in the range 1-12. Make the code agree with the spec.
author William Astle <lost@l-w.ca>
date Thu, 04 Aug 2016 12:50:12 -0600
parents 36c4cda4b6c4
children
line wrap: on
line source

This document describes an extension to the LWWire protocol which provides
a "PINGPONG" facility. It does not provide a generally useful service.
However, it does serve to show how a basic extension can be defined. It also
gives clients an option to enable an extension and use that to determine if
the server has reset or otherwise got into a mixed up state. For instance,
the client could negotiate the PINGPONG extension and then periodically send
a PINGPONG_PING operation. If it doesn't get the appropriate response, it
can then assume that the server has reset and it should re-initialize its
drivers.

LWWire Protocol Extension
=========================

This extension is called PINGPONG and is assigned extension number DF. It
defines the following operations in its extension space.

00 PINGPONG_PING

This does just what it's name implies. It does nothing except reply to the
client.

Request:

Octet	Meaning
-----	-------
0-2	F3 DF 00

Response:

Octet	Meaning
-----	-------
0	42

The response will always be 42.

01 PINGPONG_PONG

This is exactly like PINGPONG_PING. It's provided for humour value.

Request:

Octet	Meaning
-----	-------
0-2	F3 DF 01

Response:

Octet	Meaning
-----	-------
0	42

The response will always be 42.