1 Star 0 Fork 45

ITI0/qytang_Python

forked from 张鹏/qytang_Python 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
2016.1.18 无缓冲客户端测试 354 Bytes
一键复制 编辑 原始数据 按行查看 历史
现任明教教主-乾颐堂 提交于 2016-01-18 09:39 . new file
import time
from socket import *
sock = socket()
sock.connect(('localhost', 60000))
file = sock.makefile('w', buffering = 1)
print('sending data1')
file.write('spam\n')
time.sleep(5)
#file.flush()
print('sending data2')
print('eggs', file = file)
time.sleep(5)
#file.flush()
print('sending data3')
sock.send(b'ham\n')
time.sleep(5)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/iti0/qytang_Python.git
git@gitee.com:iti0/qytang_Python.git
iti0
qytang_Python
qytang_Python
master

搜索帮助