日期:2014-05-16 浏览次数:20768 次
struct PlatMsgHead *Head; Head = (struct PlatMsgHead *)mmap(NULL, sizeof(struct PlatMsgHead)*100, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0); /* 从客户端读取buf */ /* 读取后拷贝到内存 */ memcpy(*(Head+i).MSG_HEAD_LEN, ((struct PlatMsgHead *)buf)->MSG_HEAD_LEN, 11);