粘包及应用在它身上的一些模块

import struct模块
能拿到客户端跟服务器发送信息时的它前几个字节
语法:
import struct


res=struct.pack("i","")

print(res)
print(len(res))


obj=struct.unpack("i",res)
print(obj[0])
View Code

 

posted @ 2018-09-04 18:01  学习python1234  阅读(93)  评论(0编辑  收藏  举报
levels of contents