--- /dev/null
+#ifndef NETWORKINTERFACE_H_
+#define NETWORKINTERFACE_H_
+
+#include <msp/core/thread.h>
+#include <msp/io/eventdispatcher.h>
+#include <msp/io/pipe.h>
+#include <msp/net/streamserversocket.h>
+
+class Client;
+class Xinema;
+
+class NetworkInterface
+{
+private:
+ class NetworkThread: public Msp::Thread
+ {
+ private:
+ NetworkInterface &network;
+ Msp::IO::Pipe wakeup_pipe;
+ bool done;
+
+ public:
+ NetworkThread(NetworkInterface &);
+
+ void terminate();
+
+ private:
+ virtual void main();
+ };
+
+ Xinema &xinema;
+ Msp::Net::StreamServerSocket *server_sock;
+ Msp::IO::EventDispatcher event_disp;
+ NetworkThread *thread;
+ std::list<Client *> clients;
+
+public:
+ NetworkInterface(Xinema &);
+ ~NetworkInterface();
+
+private:
+ void connection_available();
+};
+
+#endif