码迷,mamicode.com
首页 >  
搜索关键字:recv    ( 1043个结果
Socket send函数和recv函数详解
Socket send函数和recv函数详解 1.send 函数 int send( SOCKET s, const char FAR *buf, int len, int flags ); 不论是客户还是服务器应用程序都用send函数来向TCP连接的另一端发送数据。客户程序一般用send函数向服务 ...
分类:其他好文   时间:2017-04-24 15:46:52    阅读次数:201
1024个读出线程的测试结果
1024个读出线程,发送端不控制速度。测试包长2KB, 测试时间983秒时, 单个线程的带宽为0.0068Gb/s, 此时的拥塞窗口为17,rtt为45000. 发送端的cpu占用率为18%, 接收端的CPU占用率为34%。接收端的Recv-Q为0,发送端的Send-Q为几百KB。 发送端和接收端先 ...
分类:编程语言   时间:2017-04-18 15:49:45    阅读次数:392
MPI中的缓冲区和非阻塞通信
转载自: Introduction to MPI - Part II (Youtube) Buffering Suppose we have These are blocking communications, which means they will not return until the a ...
分类:其他好文   时间:2017-04-18 14:15:04    阅读次数:297
python socket
#ServerimportsocketHOST=‘‘PORT=51234s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)s.bind((HOST,PORT))s.listen(1)conn,addr=s.accept()print‘Connectedby‘,addrwhileTrue:data=conn.recv(1024)print‘received:‘,dataifnotdata:breakconn.sendall(data)conn.close()--..
分类:编程语言   时间:2017-04-18 11:41:17    阅读次数:196
Web - TCP的三次握手
?在TCP/IP协议中,TCP协议提供可靠的连接服务,採用三次握手建立一个连接。 第一次握手:建立连接时,client发送syn包(syn=j)到server,并进入SYN_SENT状态,等待server确认;SYN:同步序列编号(Synchronize Sequence Numbers)。 第二次 ...
分类:Web程序   时间:2017-04-18 11:30:45    阅读次数:203
I/O 阻塞与非阻塞,同步与异步
一、I/O模型 一个输入操作通常包括两个阶段: (1)等待数据准备好; (2)从内核向进程复制数据。 1、阻塞式 系统调用直到数据报到达且被复制到应用进程的缓冲区或者发生错误才会返回。也就是说recvfrom从开始到它返回的整段时间内都是被阻塞的。 系统调用直到数据报到达且被复制到应用进程的缓冲区或 ...
分类:其他好文   时间:2017-04-17 19:51:29    阅读次数:200
面向连接的网络应用程序--服务器端
Linux环境下有专门用于读写面向连接的套接字函数,分别是send函数和recv函数,send函数和recv函数原型如下: ssize_t recv(int sockfd, void *buff, size_t nbytes, int flags); 头文件: #include <sys/socke ...
分类:其他好文   时间:2017-04-16 21:09:49    阅读次数:287
web框架 源码
import socket def handle_request(client): buf=client.recv(1024) ckient.send('HTTP/1.1 200 OK\r\n\r\n') client.send('Hello,world') def main(): sock=soc... ...
分类:Web程序   时间:2017-04-15 15:50:40    阅读次数:166
C语言sendto()函数:经socket传送数据
相关函数:send, sendmsg, recv, recvfrom, socket头文件:#include <sys/types.h> #include <sys/socket.h>定义函数:int sendto(int s, const void * msg, int len, unsigned ...
分类:编程语言   时间:2017-04-06 00:48:52    阅读次数:223
在SUSE平台启动和关闭mysql服务
查看mysql服务 yxm:~ # netstat -nlp Active Internet connections (only servers)Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp ...
分类:数据库   时间:2017-04-06 00:13:15    阅读次数:366
1043条   上一页 1 ... 65 66 67 68 69 ... 105 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!