Programmers Reference - CTransport (1)
class CTransport : public CObject
#include "ConSys.h"
class CTransport : public CObject { public: DECLARE_CONSYS_SERIAL(CTransport); public: CTransport(); virtual BOOLEAN Create(CTransportDoc const* pDoc, const CString &serverName = "\\\\.\\", BOOLEAN server = FALSE); virtual ~CTransport(); public: virtual CTransport& operator <<(CObject* pObject); virtual CTransport& operator >>(CObject* &pObject); virtual BOOLEAN WaitForClient() const; virtual BOOLEAN ImpersonateClient() const; virtual BOOLEAN RevertToSelf() const;
// Functions for setting op the transporrt layer. These functions is used // by the ConSysManager, and should be overwritten in decendants virtual CSingleDocTemplate* SingleDocTemplate() const; virtual CMultiDocTemplate* MultiDocTemplate() const;
public: BOOLEAN connectionAlive; // Is the connection to the partner alive. #ifdef _DEBUG public: virtual void Dump(CDumpContext &dc) const; virtual void AssertValid() const; #endif
the CTransport class defines the transport layer interface. This class is a virtual class, and has no real functionality. To implement an actual transport, override the virtual function in this class.
The assertion must be valid after the constructor of the class is called.
For handling atomic read and write of objects, the CTransport uses a CTransportPort class. A instance of this class is passed on to the serialization functions.
References:
Last Modified 10 January 2019