The last post (pericmd 040) describes the Riap protocol. Riap is an abstract protocol that does not specify how data should be transported on the wire. For that, two more protocols are defined: Riap::HTTP and Riap::Simple. The first one specifies how Riap is used with HTTP/HTTPS transport, and the second one is about how Riap can be transported over any stream socket (or pipe).
Since the latter is significantly simpler (even though it is lacking some nice features that Riap::HTTP provides), I’ll cover it first:
Client sends Riap request in a single line: the letter “j” (lowercase), followed by the Riap request hash encoded as JSON (must all be in a single line), followed by CRLF.
Server sends response in a single line also: the letter “j” (lowercase), followed by enveloped response array encoded as JSON (must all be in a single line), followed by CRLF.
If client or server sends invalid data, the connection can be closed.