The request server needs to support batching of file list requests. To
address this the methods LsSave(string) and LsNext()string are added to
the Request object. They should work to store a token to keep your place.
The Handler should now return an EOF when the end of the directory list is
reached. If it doesn't but returns an empty list, the wrapper will send the EOF
for you.
The old behaviour of just returning 1 batch and sending the EOF is preserved if
you don't set the token (you don't use LsSave). It will return the 1 list and
EOF on the next underlying readdir call. This is to preserve backwards
compatibility and it not the recommended way to handle file lists.
fstat and fsetstat are not converted to versions that work on path
instead of working with open filehandle. So I removed them from the
request.update method which updates the request object for methods that
are working on an opened file.
Had file attributes, but not the flags which are required for the
attributes to be meaningful. The stats stuff in the request-server is
very simplistic, but I want it to be able to be used even if a PITA.
Added a test that breaks w/ old code which has typos but is fixed with
typos fixed. Also added switch-default error message that would have
helped diagnose this (should have been there already).
Encapsulate stateful data into sub-structures with pointer references
from the Request structure. This allows me to pass by value in most
cases to keep non-stateful (write once) data data race free and tightly
controlling access to stateful data to ease locking.
working to decouple request handling from packet handling. adding a
response channel means I don't need to handle sending packets.
eliminated need for cur_pkt and sendError() on request objects so far.