51

Python基础:网络编程socket基本篇-回首已是空

 6 years ago
source link: http://blog.51cto.com/yishi/2072956
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
socket也叫套接字,是对各种协议的封装,实现收发数据。Python里socket工作过程:(图片来自网络)socket在Python中实际上是一个模块,实现发送和接收数据的功能。因为socket是一个类,所以只导入模块需要使用socket.socket()创建一个socket对象。创建一个socket格式:socket(family=AF_INET,type=SOCK_STREAM,proto

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK