上一页 1 ··· 203 204 205 206 207 208 209 210 211 ··· 229 下一页
摘要: Redis在anet.h和anet.c中封装了底层套接字实现:1.anetTcpServer,建立网络套接字服务器,完成对socket(),bind(),listen()等操作的封装,返回socket的fd。int anetTcpServer(char *err, int port, char *bindaddr){ int s; struct sockaddr_in sa; //见1.1结构体 if ((s = anetCreateSocket(err,AF_INET)) == ANET_ERR) ... 阅读全文
posted @ 2014-01-12 21:01 一天不进步,就是退步 阅读(1900) 评论(0) 推荐(0) 编辑
摘要: java.net.SocketException如何才能更好的使用呢?这个就需要我们先要了解有关这个语言的相关问题。希望大家有所帮助。那么我们就来看看有关java.net.SocketException的相关知识。第1个异常是 java.net.BindException:Address already in use: JVM_Bind。该异常发生在服务器端进行new ServerSocket(port)(port是一个0,65536的整型值)操作时。异常的原因是以为与port一样的一个端口已经被启动,并进行监听。此时用netstat –an命令,可以看到一个Listending状态的端口。只 阅读全文
posted @ 2014-01-09 14:02 一天不进步,就是退步 阅读(952) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/hankscpp/article/details/8611229一、 TCP/IP 和 ISO/OSI ISO/OSI模型,即开放式通信系统互联参考模型(Open System Interconnection Reference Model),是国际标准化组织(ISO)提出的一个试图使各种计算机在世界范围内互连为网络的标准框架,简称OSI。 TCP/IP协议模型(Transmission Control Protocol/Internet Protocol),包含了一系列构成互联网基础的网络协议,是Internet的核心协议,通过20多年的发... 阅读全文
posted @ 2014-01-08 15:42 一天不进步,就是退步 阅读(17219) 评论(0) 推荐(1) 编辑
摘要: http://blog.csdn.net/inject2006/article/details/2139149ping的原理ping程序是用来探测主机到主机之间是否可通信,如果不能ping到某台主机,表明不能和这台主机建立连接。ping使用的是ICMP协议,它发送icmp回送请求消息给目的主机。ICMP协议规定:目的主机必须返回ICMP回送应答消息给源主机。如果源主机在一定时间内收到应答,则认为主机可达。 ICMP协议通过IP协议发送的,IP协议是一种无连接的,不可靠的数据包协议。在Unix/Linux,序列号从0开始计数,依次递增。而Windows ping程序的ICMP序列号是没有规律。 阅读全文
posted @ 2014-01-08 10:51 一天不进步,就是退步 阅读(986) 评论(0) 推荐(0) 编辑
摘要: ping命令是用来查看网络上另一个主机系统的网络连接是否正常的一个工具。ping命令的工作原理是:向网络上的另一个主机系统发送ICMP报文,如果指定系统得到了报文,它将把报文一模一样地传回给发送者,这有点象潜水艇声纳系统中使用的发声装置。例如,在Linux终端上执行ping localhost命令将会看到以下结果:PING localhost.localdomain (127.0.0.1) from 127.0.0.1 : 56(84) bytes of data.64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=0 ttl=2 阅读全文
posted @ 2014-01-08 10:40 一天不进步,就是退步 阅读(1155) 评论(0) 推荐(0) 编辑
摘要: http://www3.ntu.edu.sg/home/ehchua/programming/howto/EclipseCpp_HowTo.htmlEclipse 4.3 (Kepler) for C/C++ ProgrammingHow To Install Eclipse CDT 8.2 and Get StartedEclipse is an open-source Integrated Development Environment (IDE) supported by IBM. The mother site is @ www.eclipse.org. Eclipse is popu 阅读全文
posted @ 2014-01-07 14:58 一天不进步,就是退步 阅读(3347) 评论(0) 推荐(0) 编辑
摘要: http://zhidao.baidu.com/link?url=uPWXURahp5KzdXbgrGTb9-r-abGaNC-J7dkhFkMhf062OJ1jeCM5wpBCgDR7bDg8uFrPTW2jL96NeTGjLNs8nKSVN Commit"C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:commit /path:%f /notempfile /closeonendSVN CommitAll"C:\Program Files\TortoiseSVN\bin\TortoiseP 阅读全文
posted @ 2014-01-06 20:39 一天不进步,就是退步 阅读(618) 评论(0) 推荐(0) 编辑
摘要: 1. redis事件的定义/* State of an event based program */typedef struct aeEventLoop { int maxfd; /* highest file descriptor currently registered */ int setsize; /* max number of file descriptors tracked */ long long timeEventNextId; /*下一个定时器的id*/ time_t lastTime; /* Used to detect system ... 阅读全文
posted @ 2014-01-05 22:34 一天不进步,就是退步 阅读(598) 评论(0) 推荐(0) 编辑
摘要: http://redis.io/topics/internals-vmVirtual Memory technical specificationThis document details the internals of the Redis Virtual Memory subsystem. The intended audience is not the final user but programmers willing to understand or modify the Virtual Memory implementation.Keys vs Values: what is sw 阅读全文
posted @ 2014-01-04 22:49 一天不进步,就是退步 阅读(1178) 评论(0) 推荐(0) 编辑
摘要: 1. Redis内存管理通过在zmalloc.h和zmalloc.c中重写c语言对内存的管理来完成的。 redis内存管理c内存管理原型作用zmallocmallocvoid *malloc(unsigned int num_bytes);分配一块指定大小的内存区域,并返回指向该区域头部的指针,分配失败则返回NULLzcalloccallocvoid *calloc(unsigned n, unsigned size);在内存的动态存储区中分配n个长度为size的连续空间,函数返回一个指向分配起始地址的指针;如果分配不成功,返回NULL。zreallocreallocoid *reall... 阅读全文
posted @ 2014-01-04 22:29 一天不进步,就是退步 阅读(7582) 评论(0) 推荐(0) 编辑
上一页 1 ··· 203 204 205 206 207 208 209 210 211 ··· 229 下一页