dsocket.h

来自「这是在PDA上运行的视频接受」· C头文件 代码 · 共 49 行

H
49
字号
#if !defined(AFX_DSOCKET_H__B098630F_5F44_11D6_8897_000B2B0F84B6__INCLUDED_)
#define AFX_DSOCKET_H__B098630F_5F44_11D6_8897_000B2B0F84B6__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


// Type of datagram socket

#define TYPE_CONTROL 11
#define TYPE_AUDIO   12
#define TYPE_VIDEO   13
#define TYPE_TEXT    14

// Port used for different datagram sockets

#define PORT_CONTROL 6000
#define PORT_AUDIO   6002
#define PORT_VIDEO   6004
#define PORT_TEXT    6006

// Message Types...
#define MESG1_CONNECT    101
#define MESG2_CONNECT    102

/////////////////////////////////////////////////////////////////////////////
// DSocket command target

class DSocket : public CSocket
{
// 属性部分
public:
	static CString remoteaddress;
	int type;

// Operations
public:

	DSocket();
	virtual ~DSocket();
	void CreateSocket(int port,int type);
	void OnReceive(int errcode);
	void SendControlMessage(int type,LPCTSTR address);
	void CloseSocket();
};

#endif // !defined(AFX_DSOCKET_H__B098630F_5F44_11D6_8897_000B2B0F84B6__INCLUDED_)

⌨️ 快捷键说明

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