摘要: JSON是一种轻量级的数据交换格式,易于人编写和阅读,同时也易于机器解析和生成 阅读全文
posted @ 2014-09-14 20:31 zlin532 阅读(139) 评论(0) 推荐(0)
摘要: POSIX共享内存 共享内存的访问同步问题必须由程序员负责,可选的同步方式有互斥锁、条件变量、读写锁、记录锁、信号量。 头文件:#include<sys/mman.h> void *mmap(void *addr,size_t len,int prot,int flag,int filedes,of 阅读全文
posted @ 2014-09-10 09:48 zlin532 阅读(360) 评论(0) 推荐(0)
摘要: 套接字相关函数 int socket(int family, int type, int protocol); 该接口创建一个套接字 family指定协议族(通常是AF_INET);type参数指定socket的类型:SOCK_STREAM、SOCK_DGRAM、SOCK_RAW;protocol通 阅读全文
posted @ 2014-09-06 15:16 zlin532 阅读(148) 评论(1) 推荐(0)
摘要: 1、进程创建int pthread_create (pthread_t * thread_id, __const pthread_attr_t * __attr, void *(*__start_routine) (void *), void *__restrict __arg);第一个参数为指向线... 阅读全文
posted @ 2014-09-05 15:52 zlin532 阅读(303) 评论(0) 推荐(0)