feature: Add client protocol option TCP/UDP

This commit is contained in:
yuanyuanxiang
2025-07-03 04:30:25 +08:00
parent 848f4089bb
commit 64bebb1b86
12 changed files with 107 additions and 52 deletions

View File

@@ -47,9 +47,8 @@
class IOCPServer : public Server
{
typedef void (CALLBACK* pfnNotifyProc)(CONTEXT_OBJECT* ContextObject);
typedef void (CALLBACK* pfnOfflineProc)(CONTEXT_OBJECT* ContextObject);
protected:
int m_nPort;
SOCKET m_sListenSocket;
HANDLE m_hCompletionPort;
UINT m_ulMaxConnections;
@@ -103,6 +102,9 @@ private:
public:
IOCPServer(void);
~IOCPServer(void);
int GetPort() const override {
return m_nPort;
}
UINT StartServer(pfnNotifyProc NotifyProc, pfnOfflineProc OffProc, USHORT uPort);