📄 128.htm
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>CTerm非常精华下载</title>
</head>
<body bgcolor="#FFFFFF">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="577">
<tr><td width="32%" rowspan="3" height="123"><img src="DDl_back.jpg" width="300" height="129" alt="DDl_back.jpg"></td><td width="30%" background="DDl_back2.jpg" height="35"><p align="center"><a href="http://apue.dhs.org"><font face="黑体"><big><big>123</big></big></font></a></td></tr>
<tr>
<td width="68%" background="DDl_back2.jpg" height="44"><big><big><font face="黑体"><p align="center"> ● UNIX网络编程 (BM: clown) </font></big></big></td></tr>
<tr>
<td width="68%" height="44" bgcolor="#000000"><font face="黑体"><big><big><p align="center"></big></big><a href="http://cterm.163.net"><img src="banner.gif" width="400" height="60" alt="banner.gif"border="0"></a></font></td>
</tr>
<tr><td width="100%" colspan="2" height="100" align="center" valign="top"><br><p align="center">[<a href="index.htm">回到开始</a>][<a href="6.htm">上一层</a>][<a href="129.htm">下一篇</a>]
<hr><p align="left"><small>发信人: guru (好读书,不求甚解), 信区: UNP <br>
标 题: 如何有效的传输大内存数据(10M以上) <br>
发信站: UNIX编程 (2001年08月06日20:00:59 星期一), 站内信件 <br>
<br>
发信人: stormtide (心寄浮云雁高飞), 信区: Socket <br>
标 题: Re: 如何有效的传输大内存数据(10M以上) <br>
发信站: 华南网木棉站 (Fri Jun 18 09:17:24 1999), 转信 <br>
<br>
【 在 hongtium (norton) 的大作中提到: 】 <br>
: 本人用Socket编程传送大块内存数据很容易出错。我用的是循环的方法,每次循环 <br>
: 送出大约4K的数据,直到传送完毕。但是如若每次送出8K以上,就很容易出错。我发现 <br>
: 服务器的send()与客户端的recv()并不保持阻塞连接,即服务器send()后就不理客户 <br>
: 端的 <br>
: recv()是否收完,拼命往下送数据。导致接收不全。(发送文件则无此问题。) <br>
: 如何保证阻塞(send与recv的同步)?如何高效快速发送大内存数据? <br>
: Help! Thanks!! <br>
socket的发送缓冲区的大小是在kernel 里定义的,不知window的大小定义为多少,你可以 <br>
在接收端用select产生的网络事件激发read,windows的缓冲读应该比网络传输快很多的 <br>
传送大量数据应没问题 <br>
<br>
发信人: stormtide (心寄浮云雁高飞), 信区: Socket <br>
标 题: RE: Re: 如何有效的传输大内存数据(10M以上) <br>
发信站: 华南网木棉站 (Thu Jun 24 10:57:45 1999), 转信 <br>
【 在 hongtium (norton) 的大作中提到: 】 <br>
: Thank you for stormtide's help. <br>
: I have done this work well after learning FD_SET & select() function. <br>
: The Client use select() function can ensure the recv() function receive <br>
: well. <br>
: I use a new technique: If recv() receives not fullly,continue recveiving! <br>
: The select() can ensure the data in FD_SET restore well.: <br>
hehe,u r welcome,indeed in vc there are some other function u can use just <br>
like select and FD_SET(),it is WSA*Select(),sorry ,i forget the true name,in <br>
this funtion Microsoft had packet some net events just like receive and other <br>
u can catch this kind of events to write ur event solution funtion , <br>
this is a better way in vc socket programming ,i think <br>
indeed,when u use select ,the kernel will auto manage the set and restore <br>
of the bit in FD_SET;in one receive ,u of course must use for(;;) to receive <br>
the data once the kernel receive. <br>
-- <br>
※ 来源:.华南网木棉站 bbs.gznet.edu.cn.[FROM: 202.38.213.137] <br>
<br>
<br>
<br>
<br>
<br>
-- <br>
Target Locked:Guru In Darkness. <br>
我只是一只静静卧着的狮子。。。 <br>
※ 修改:·guru 於 08月06日20:02:10 修改本文·[FROM: 202.114.36.224] <br>
※ 来源:·UNIX编程 www.tiaozhan.com/unixbbs/·[FROM: 202.114.36.224] <br>
</small><hr>
<p align="center">[<a href="index.htm">回到开始</a>][<a href="6.htm">上一层</a>][<a href="129.htm">下一篇</a>]
<p align="center"><a href="http://cterm.163.net">欢迎访问Cterm主页</a></p>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -