]> source.dussan.org Git - tigervnc.git/commitdiff
Added the sessionTerminateThread class implementation, which allow
authorgeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Thu, 10 Mar 2005 18:00:41 +0000 (18:00 +0000)
committergeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Thu, 10 Mar 2005 18:00:41 +0000 (18:00 +0000)
the rfbSessionReader class terminate itself.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@240 3789f03b-4d11-0410-bbf8-ca57d06f2519

rfbplayer/rfbplayer.h

index 20cf15a5d40a17a18a125c548efd949c4ae23779..9357428c95726dea29626ef7c03055d98c9b7a6b 100644 (file)
@@ -180,3 +180,20 @@ class RfbPlayer : public RfbProto {
     long imageDataStartTime;
     long sessionTimeMs;
 };
+
+// -=- sessionTerminateThread class
+
+// It is a special thread class, wich is allow the rfbSessionReader class
+// terminate itself.
+
+class sessionTerminateThread : public rfb::Thread {
+public:
+  sessionTerminateThread(RfbPlayer *_player) : player(_player) {
+    setDeleteAfterRun();
+  }
+  virtual void run() {
+    player->closeSessionFile();
+  }
+protected:
+  RfbPlayer *player;
+};