FRequest is a simple file transfer protocol for use on Minitel or similar networks.
A client request consists of the following:
- A single-character request type
- The path for the file the client is requesting
- A newline
Request types can be the following characters:
- t - transfer - request file contents
- s - stat - request file size and type (format: (d or f)<size>)
The server should respond with:
- A single character status code
- The result of the request
Status codes can be the following characters:
- y - yes - file found, read and sent
- d - directory - directory listing sent
- n - not found - no such file or directory
- f - failure - other type of failure, reason sent
- The client initiates a connection to the server on the FRequest port (default 70)
- The client sends t to ask for a transfer, the path example.txt, and a newline.
- The server finds the file and responds with y followed by the file contents.
- The server closes the connection when the transfer is completed.
Servers may wish to implement restricting users to a specific directory.