Python笔记
🗒️Socket客户端编程
00 分钟
2021-7-2
2023-12-30
type
status
date
slug
summary
tags
category
icon
学习进度
指定ip地址和端口
调用send就可以向服务端发送消息,发送的消息是字节数组所以要通过encode,utf-8来编码
接收消息就通过recv方法去接收,这个方法是阻塞式的,没有收到消息,就要会一直等待,收到消息之后就可以通过close来关闭链接。
notion image