net.h

来自「工程機器人自主作業控制程序」· C头文件 代码 · 共 57 行

H
57
字号
#ifndef _NET_H_
#define _NET_H_

#ifndef _WINSOCKAPI_ //avoiding compile errors if
#include <winsock2.h>//include winsock2.h after 
#endif               //include windows.h

#ifdef __cplusplus
extern "C" {
#endif

#define HCONTROL		1    
#define HSCENE   		2
//#define HPLATFORM	    3
//#define HFLATFORM	4
//#define HRADAR1		5                     
//#define HRADAR2		6                           
//#define HRADAR3	    7
//#define HRADIO		8
//#define HAUDIO		9
//#define HFLY		10
//#define HCONSOLE	11
//#define HMAINTAIN	12

extern __declspec(selectany) char *dotAddr[] = {
//"223.255.254.1",
"10.30.16.220",
"10.30.16.225",

/*"127.0.0.1",
"127.0.0.1",*/

//"22.89.211.56",
//"223.255.254.4",
//"223.255.254.5",
//"223.255.254.6",
//"223.255.254.7",
//"223.255.254.8",
//"223.255.254.9",
//"223.255.254.10",
//"223.255.254.11",
//"223.255.254.12",
NULL
};


//functions for internal call
extern void init_net(void);
extern void close_net(void);
extern int snd(const char *buf, int len, int to);
extern int rec(char *buf, int len);

#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

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