newechoes/src/content/理解计算机/python/网络/TCP客户端.md
2025-04-19 01:06:52 +08:00

266 B

title date tags
TCP客户端 2024-06-06T23:51:47Z

1.使用socket类创建一个套接字对象 2.使用connect((host,port))设置连接的主机IP和主机设置的端口 3.使用recv()/send()方法接收和发送数据 3.使用close()关闭套接字