📄 dsocket.h
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -