Socket-window通讯

2021-03-31 08:24

阅读:385

标签:rtu   erro   ted   send   转义   设备   std   tcp   comm   

#define _WINSOCK_DEPRECATED_NO_WARNINGS


#include
#include
#include
#include

#include 
#include 

using namespace std;
#pragma comment(lib, "ws2_32.lib")

int main()
{
	WORD sockVersion = MAKEWORD(2, 2);
	WSADATA data;
	if (WSAStartup(sockVersion, &data) != 0)
	{
		return 0;
	}


	int i = 0;
	while (true) 
	{
		std::cout 0) {
			recData[ret] = 0x00;
			std::string result(recData);


		}
		closesocket(sclient);
	}

	

	WSACleanup();
	return 0;

}

  

Socket-window通讯

标签:rtu   erro   ted   send   转义   设备   std   tcp   comm   

原文地址:https://www.cnblogs.com/alexYuin/p/9267685.html


评论


亲,登录后才可以留言!