--- /dev/null
+#ifndef CLIENT_H_
+#define CLIENT_H_
+
+#include <msp/fs/path.h>
+#include <msp/net/streamsocket.h>
+
+class Xinema;
+
+class Client
+{
+private:
+ Xinema &xinema;
+ Msp::Net::StreamSocket *socket;
+ std::string buffer;
+ bool stale;
+
+public:
+ Client(Xinema &, Msp::Net::StreamSocket *);
+
+ bool is_stale() const { return stale; }
+
+private:
+ void data_available();
+ void end_of_stream();
+
+ void process_command(const std::string &);
+ void send_reply(const std::string &);
+ void list_directory(const Msp::FS::Path &);
+};
+
+#endif