上一页 1 ··· 3 4 5 6 7
摘要: 1 #define POLL_FD_SIZE 1024 2 int doServicePoll(int listenFd) 3 { 4 struct sockaddr_in cliAddr; 5 socklen_t len; 6 7 int i; 8 struct pollfd pollFdSet[POLL_FD_SIZE]; 9 for(i = 0 ; i fdNum) {41 fdNum = i;42 }43 ... 阅读全文
posted @ 2014-03-16 23:03 superPerfect 阅读(348) 评论(0) 推荐(0) 编辑
摘要: .tar解包:tar xvf FileName.tar打包:tar cvf FileName.tar DirName(注:tar是打包,不是压缩!)———————————————.gz解压1:gunzip FileName.gz解压2:gzip -d FileName.gz压缩:gzip FileName.tar.gz解压:tar zxvf FileName.tar.gz压缩:tar zcvf FileName.tar.gz DirName———————————————.bz2解压1:bzip2 -d FileName.bz2解压2:bunzip2 FileName.bz2压缩: bzip2 阅读全文
posted @ 2014-03-16 15:57 superPerfect 阅读(317) 评论(0) 推荐(0) 编辑
摘要: //read操作加上超时时间。 1 int read_timeout(int fd, void *buf, uint32_t count, int time) 2 { 3 if(time > 0) { 4 fd_set rSet; 5 FD_ZERO(&rSet); 6 FD_SET(fd, &rSet); 7 8 struct timeval timeout; 9 memset(&timeout, 0, sizeof(timeout));10 timeout.tv_sec = time;... 阅读全文
posted @ 2014-03-16 15:52 superPerfect 阅读(2098) 评论(0) 推荐(0) 编辑
摘要: 本文内容来自http://www.cnblogs.com/chen1987lei/archive/2010/12/02/1894768.html=========================执行以下命令。 sudo apt-get install openssh-serverssh-server配置文件位于/ etc/ssh/sshd_config,在这里可以定义SSH的服务端口,默认端口是22,你可以自己定义成其他端口号,如222。然后重启SSH服务: sudo /etc/init.d/ssh resart 事实上如果没什么特别需求,到这里 OpenSSH Server 就算安装好了.. 阅读全文
posted @ 2013-11-24 16:45 superPerfect 阅读(229) 评论(0) 推荐(0) 编辑
摘要: DIR_INC = ./includeDIR_SRC = ./srcDIR_OBJ = ./objDIR_BIN = ./binINCLUDES = -I${DIR_INC} -I. CC = g++CFLAGS = -g -Wall ${INCLUDES} SRV_SRC = $(wildcard ${DIR_SRC}/srv/*.cpp) CLI_SRC = $(wildcard ${DIR_SRC}/cli/*.cpp) SRV_OBJ = $(patsubst %.cpp,${DIR_OBJ}/srv/%.o,$(notdir ${SRV_SRC})) CLI_OBJ = $(pats 阅读全文
posted @ 2013-11-22 19:40 superPerfect 阅读(280) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7