TCP网络编程(Python版)
客户端:# socket_client_tcpfrom socket import *ip_port = ('127.0.0.1', 8080) # ip和端口back_log = 5buffer_size = 1024tcp_client = socket(AF_INET, SOCK_STREAM)# 连接tcp_client.connect(ip_port)while True: # 发送消息 msg = input('input >>:')