github地址:
https://github.com/LeiZhang-Hunter/sendDemo
#測試結果
多進程模式下對send的原子性進行測試
####第一個測試例子
```
gcc demoServer.c -o demoServer
gcc demoClient.c -o demoClient
```
單次發送33643個字節,開4個進程每個進程發送10000次,總計40000次,服務端總計收到字節close:1345720000,輸出結果完全正確
但是內容出現了混亂,原本有序的css 出現了
ine-height:0@�D{�Ubuf:!important}#csdn_tool_otherPlace .pull-right .gi
這是因爲沒有bzero,buf,但是後來清空之後還是亂了
這一類錯誤的字節
一次關於send非原子性的測試
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
-> 在c語言中是什麼意思?
zhaojiabo1997
2020-07-08 08:36:40
cvCloneImage()和cvCopy()的區別
lcy9819
2020-07-08 11:22:40
用MASM實現讀UCS-2文件
Just_Fancy
2020-07-08 11:15:30
C語言的一些細節總結
redarm
2020-07-08 10:59:37
養生需知:世上最健康的作息時間
wsimei
2020-07-08 10:29:28
ASP正則表達式收集
haichanglin
2020-07-08 10:27:05
太陽的女人18
id="I7" marginwidth="0" marginheight="0" src="http://www.bookeba.cn/securi
new66
2020-07-08 10:21:11
Apache Tomcat 6.0.18與JDK的安裝配置
银月术
2020-07-08 09:14:45
DirectorySearcher 的PropertiesToLoad所有屬性
银月术
2020-07-08 09:14:45
Microsoft windows internals 學習筆記(1)
herx1
2020-07-08 08:25:19
ZJU-1066
immortality
2020-07-08 08:24:45
ZJU-1042
immortality
2020-07-08 08:24:44