1 Python TCP客户端的Socket通信
1.1 连接服务器
self.serverSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.serverHost = '10.118.21.61'
self.serverPort = 20173
self.serverSock.connect((self.serverHost, self.serverPort))
1.2 发送byte数据
1.2.1 struct构建byte数据:
values = (len(self