= %d\\n\ } }
Execute Result:
Client (Enter ‘R’ and get the datum):
} sprintf_s(sendBuf, \HUMIDITY = %d T,H,L); printf(\send(sockConnect, sendBuf, strlen(sendBuf)+1, 0); LIGHT Temperature.close(); Humidity.close(); Light.close(); closesocket(sockConnect); } closesocket(sockSrv); WSACleanup(); return 0;
6 / 7
Server(One Client & Two or more clients):
Conclusion:
This socket communication is dependent on TCP protocol. Network programming is still following create->initialize->communicate->close this sequence.
7 / 7
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库ProgrammingProject1 SocketProgramming(WinSocket编程-TCP协议)(2)在线全文阅读。
相关推荐: