Transports
As noted at Protocol, PawSD can operate over any underlying transport that can provide a request-response model. Some of them are described here. Note that as the protocol itself does not provide any data integrity, it's highly recommended to use a transport that does, such as TLS (but not TCP as data could be maliciously tampered with in transit).
Stream-oriented
For any stream-oriented transport (such as TCP or TLS), a simple flow can be used:
- client opens connection to a listening server
- server accepts connection and waits to read the request
- client sends the entire request as-is, then waits to read the response
- server reads the request, sends the entire response as-is, then closes the connection from their end
- client reads the response, then closes the connection
i'm considering, maybe this should be changed so that you don't have to close the connection at the end, and therefore you can reuse an open connection to send further requests? (like http keepalive)
i'm not sure on this yet though
For plain TCP, the suggested port number is 10016, and for TLS, 16123. But you can use any port you want :)
