| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 | #pragma once#include <Acceptor.h>#include "LNContext.h"#include <list>#include <mutex>class CLNAcceptor     : public CAcceptor<CLNContext>{public:    CLNAcceptor(CProtocolHandler *);	virtual ~CLNAcceptor(void);	friend class CLNHandle;	virtual CLNContext* make_handler();	void Lock() { cs.Lock(); }	void Unlock() { cs.Unlock(); }	virtual void OnClearContext();	//定时清除链接	void ClearAllContexts();	//清除所有链接	int GetContextNum();	//查找链接	CLNContext* FindContext(DWORD_PTR pContext);	CLNContext* FindContextByIMEI(const char *imei);	void SendDataAllContexts(uint8_t* data, size_t len);	CLNContext* FindContextByIVU(const char *imei);	void	GetAllContextImei(std::list<CString>& lst);	int validate_connection(const ACE_Asynch_Accept::Result& result, const ACE_INET_Addr& remote, const ACE_INET_Addr& local) override;protected:	CCriticalSection cs;	std::list<CLNContext*> m_lstClientContext;    CProtocolHandler *m_pHandler = nullptr;};
 |