05 2016 档案
摘要:1. 华蓓老师主页 http://staff.ustc.edu.cn/~bhua/ 2. OSI vs TCP/IP 3. TCP header 4. TCP流量控制 1)连接建立时,接收端告诉发送端接收窗口的数值rwnd=400byte 2) 如果发生丢包,接收端回给发送端的ack字段设为1, a
阅读全文
摘要:#include <sys/socket.h> 1. int socket(int domain, int type, int protocol) socket: return fd domain: AF_INET(IPv4), AF_INET6(IPv6) type: SOCK_DGRAM(udp
阅读全文
摘要:1.查看各种目标文件的结构和内容 objdump -h SimpleSection.o 2.查看ELF文件代码段、数据段、BSS(Block Stated by Symbol)段的长度 size SimpleSection.o 注解: 程序源码被编译后主要分成两种段:程序指令和程序数据。 代码段属于
阅读全文
摘要:0. ln -s src_dir //一个参数即可在当前目录下生成一个软链接 1.git command --clone/push a branch git clone <url> --branch <branch> --single-branch [<folder>] git push remot
阅读全文
摘要:本人跟web无缘,从来没有想去学http,现在看来,学学也是有益无害,总会要用着点滴。 RFC见这里: https://www.ietf.org/rfc/rfc2616.txt 0. URI格式 http://host[:port][abs_path] 1. Message Type (Reques
阅读全文
摘要:1. Hello, World #import <Foundation/Foundation.h> int main() 2. Block(本质是匿名函数,类似C的函数指针, JS closure, C++11的Lambda functions) (1) example: NSLog(@"sum i
阅读全文
摘要://Test write json Json::Value rooter; Json::FastWriter w; rooter["isTest"] = false; rooter["isAndy"] = true; std:string json_string = w.write(rooter);
阅读全文