From: george82 Date: Thu, 10 Mar 2005 18:00:41 +0000 (+0000) Subject: Added the sessionTerminateThread class implementation, which allow X-Git-Tag: v0.0.90~384^2~595 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f0e42de5fc317ee39c68d97b3119961c8e715104;p=tigervnc.git Added the sessionTerminateThread class implementation, which allow the rfbSessionReader class terminate itself. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@240 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- diff --git a/rfbplayer/rfbplayer.h b/rfbplayer/rfbplayer.h index 20cf15a5..9357428c 100644 --- a/rfbplayer/rfbplayer.h +++ b/rfbplayer/rfbplayer.h @@ -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; +};