Files
barrier/CMessageSocket.h
crs 900b075e3a initial revision of synergy. currently semi-supports X windows
on unix, but client screens don't simulate events other than
mouse move.  also not supporting clipboard at all yet and the
main app is just a temporary framework to test with.  must
clean up protocol and communication.
2001-05-13 11:40:29 +00:00

34 lines
802 B
C++

#ifndef CMESSAGESOCKET_H
#define CMESSAGESOCKET_H
#include "CSocket.h"
class CMessageSocket : public CSocket {
public:
CMessageSocket(ISocket* adoptedSocket);
virtual ~CMessageSocket();
// ISocket overrides
// connect(), listen(), and accept() may not be called.
virtual void setWriteJob(IJob* adoptedJob);
virtual void connect(const CString& hostname, UInt16 port);
virtual void listen(const CString& hostname, UInt16 port);
virtual ISocket* accept();
virtual SInt32 read(void* buffer, SInt32 numBytes);
virtual void write(const void* buffer, SInt32 numBytes);
private:
SInt32 doRead();
virtual void readJobCB();
virtual void writeJobCB();
private:
ISocket* m_socket;
UInt8* m_buffer;
SInt32 m_size;
SInt32 m_capacity;
SInt32 m_msgSize;
};
#endif