⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vudpservice.h

📁 otl简单包装实现类,对数据库进行操作的,简单易用.
💻 H
字号:
/***************************************************************************                          vudpservice.h -  description                             -------------------    begin                : 01.06 10:18:00 CST 2004    copyright            : (C) 2004 by |LiuZhong|    email                : |zliu@foundermn.com| ***************************************************************************//*************************************************************************** *                                                                         * *   This program is free software; you can redistribute it and/or modify  * *   it under the terms of the GNU General Public License as published by  * *   the Free Software Foundation; either version 2 of the License, or     * *   (at your option) any later version.                                   * *                                                                         * ***************************************************************************/#ifndef VUDPSERVICE_H#define VUDPSERVICE_H#include "vrssocket.h"#include "vbaseobject.h"class VUdpService{public:	virtual void  OnReceive(int DataSize,const char* FromAddr,int FromPort);	virtual void  OnTimeOut(int MSec);	virtual void  OnError(int ErrorCode);		int   Send(const char* pData,int Size,const char* ToAddr,int ToPort);	int   Receive(char* pData,int Size);	int   Receive(char* pData,int Size,char* FromAddr, int* FromPort,int MSec=0);public:	VUdpService();	virtual ~VUdpService();	bool Start(const char* Address,int Port);	void Close();	void DoService(int MSec=0);	int  SelectReceive(int MSec=0);        void SetReceiveBuf(int BufSize=64*1024L);private:	CRSSocket  m_ServerRs;	VCritiSec  m_CritiSend;	VCritiSec  m_CritiRecv;	bool       m_bRunning;	long       m_BufSize;};#endif

⌨️ 快捷键说明

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