As I’ve found with Icon Machine, there’s nothing like putting out a release to motivate me to do more work.
I’ve made progress on the login bug - I fixed one problem on the server, but it seems there are one or two more bugs that have the same symptoms.
In the process of testing that, I discovered that there were several memory leaks. I have now fixed all but one leak on the server. The client is a bit more complicated.
And when I got tired of debugging, I started on the HTTP server. I’m using the Mac OS Core Foundation HTTP utilities, sacrificing some portability for convenience. On the other hand, that stuff may be available in the Darwin source code. I’m not sure because I find the Darwin source kind of hard to navigate.
I think the HTTP server is a potentially very interesting module. It’s going to be fully integrated into the server, translating between HTTP messages and Volley messages so that any Volley service can have an HTTP interface.
The plan is that in an HTTP request, the first “directory” name in the URI indicates the service name. For example, the URL “http://server/files/Shareware/iconmachine.sit” means the pathname “/Shareware/iconmachine.sit” in the files service. Likewise, if the chat service supported a web interface, it would be at “http://server/chat” (or you could add a chat room name on the end).
The file sharing service itself will be separate. There are two reasons for this. First, as seen above, the HTTP service is a general-purpose thing. Second, HTTP won’t be the only way to upload and download, since there will be things like the Hotline compatibility plugin which has its own file transfer mechanism.
Since I’m using a protocol for file transfers that’s also used by lots of other applications, there exists the possibility of downloading a file without being logged in with a Volley client. Therefore there will be a permission setting for allowing or disallowing this on a per-user basis.
The more I think about it, the happier I am with this HTTP thing. Aside from all the cool stuff already mentioned, the HTTP spec includes authentication, uploading and downloading, and resumable downloads. There are even response codes (like 503 Unavailable) that are appropriate for managing download queues.