interface_qtcpmsgserver.h

来自「BCB下的高效开发包。包含大并发的网络库」· C头文件 代码 · 共 30 行

H
30
字号
#ifndef Interface_QTcpMsgServerH
#define Interface_QTcpMsgServerH
#include <string>
//---------------------------------------------------------------------------
class IQTcpMsgServer
{
        public:
                virtual      __stdcall ~IQTcpMsgServer() {}
                virtual void __stdcall Release() = 0;
                
                virtual bool __stdcall Start(unsigned int Port, unsigned int MaxSession, const std::string& EndSign, unsigned int MaxPackage) = 0;
                virtual void __stdcall Stop(void) = 0;
                virtual bool __stdcall IsPowerOn(void)const = 0;
                virtual bool __stdcall Send(int SessionID, const std::string& Msg) = 0;
                virtual bool __stdcall GetQueuedMsg(int* pSessionID, std::string* pMsg) = 0;//当返回pMsg为空表示该Session断开,在GC机制下可以不理会
                virtual std::string __stdcall GetAddress(int SessionID)const = 0;
                virtual void __stdcall ShutDown(int SessionID) = 0;
                virtual void __stdcall Process(void) = 0;
                virtual void __stdcall ProcessGC(void) = 0;
                virtual void __stdcall SetTimeOut(unsigned int TimeOut) = 0;
                virtual bool __stdcall IsExist(int SessionID)const = 0;
                virtual unsigned int __stdcall GetCount(void)const = 0;
                virtual void __stdcall SetReadLastData(bool IsReadLast) = 0;
                virtual int  __stdcall PushSocket(int Sock) = 0;
        public:
                static IQTcpMsgServer* __stdcall Create(void);
};
//---------------------------------------------------------------------------
#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?