mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-25 12:06:26 +03:00
ed8ed72f26
init() it while it's already running. fixed an uninitialized pointer bug in CServer and some cleanup-on-error code in CMSWindowsPrimaryScreen. also added timeout to read() on IInputStream and a heartbeat sent by clients so the server can disconnect clients that are dead but never reset the TCP connection. previously the server would keep these dead clients around forever and if the user was locked on the client screen for some reason then the server would have to be rebooted (or the server would have to be killed via a remote login).
29 lines
536 B
C++
29 lines
536 B
C++
#ifndef CINPUTSTREAMFILTER_H
|
|
#define CINPUTSTREAMFILTER_H
|
|
|
|
#include "IInputStream.h"
|
|
|
|
class CInputStreamFilter : public IInputStream {
|
|
public:
|
|
CInputStreamFilter(IInputStream*, bool adoptStream = true);
|
|
~CInputStreamFilter();
|
|
|
|
// manipulators
|
|
|
|
// accessors
|
|
|
|
// IInputStream overrides
|
|
virtual void close() = 0;
|
|
virtual UInt32 read(void*, UInt32 maxCount, double timeout) = 0;
|
|
virtual UInt32 getSize() const = 0;
|
|
|
|
protected:
|
|
IInputStream* getStream() const;
|
|
|
|
private:
|
|
IInputStream* m_stream;
|
|
bool m_adopted;
|
|
};
|
|
|
|
#endif
|