望远镜系统监控+软件升级
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021
  1. #ifndef _TCPSOCKET_H_ //ֹظ
  2. #define _TCPSOCKET_H_
  3. #include<stdbool.h>
  4. #include<stdio.h> //printf
  5. #include<WinSock2.h> //̵ͷļ
  6. #pragma comment(lib,"ws2_32.lib") //ļ
  7. #define err(errMsg) printf("[error]%s failed code %d \
  8. line:%d", errMsg, WSAGetLastError(),__LINE__); //궨print
  9. #define PORT 8888 //趨˿ںΪ88880-1024ϵͳһ㲻ã궨岻÷ֺ
  10. //ʼ
  11. bool init_Socket(); //alt+enter
  12. //ر
  13. bool close_Socket();
  14. //socketsocketһ±꣩
  15. SOCKET create_serverSocket();
  16. //ͻˣͻsocketipַ
  17. SOCKET create_clientSocket(const char* ip);
  18. #endif