3 // (C) Copyright Seb Wills 2005
5 // Linux-specific subclass of SocketInputBase: provides network socket control of Dasher cursor
7 #include "../Common/Common.h"
9 #include "SocketInput.h"
10 #include "SocketInputBase.h"
15 #define _(_x) gettext(_x)
17 using namespace Dasher
;
19 CSocketInput::CSocketInput(CEventHandler
*pEventHandler
, CSettingsStore
*pSettingsStore
)
20 :CSocketInputBase(pEventHandler
, pSettingsStore
) {
23 CSocketInput::~CSocketInput() {
29 bool CSocketInput::LaunchReaderThread() {
30 if (pthread_create(&readerThread
, NULL
, ThreadLauncherStub
, this) == 0) {
33 //TODO should probably pop up a Gtk error message and think about how to do i18n:
34 cerr
<< _("Dasher socket input: failed to launch reader thread.") << endl
;
39 void CSocketInput::CancelReaderThread() {
40 pthread_cancel(readerThread
);