07 2020 档案

摘要:一.windows管道简介 管道(Pipe)的定义:A pipe is a section of shared memory that processes use for communication. The process that creates a pipe is the pipe serve 阅读全文
posted @ 2020-07-18 15:07 yukiyuna 阅读(347) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/p312011150/article/details/82904518 https://www.jianshu.com/p/5fd5bdaac69c 阅读全文
posted @ 2020-07-07 16:37 yukiyuna 阅读(65) 评论(0) 推荐(0) 编辑
摘要:CALLBACK == WINAPI ==__stdcall实际上就是一种调用模式,就是约定由调用函数来自行解决压栈参数,同 pascal 调用。回调函数只能是类的静态成员函数或是类外定义的全局函数 #define CALLBACK __stdcall #define WINAPI __stdcal 阅读全文
posted @ 2020-07-07 15:50 yukiyuna 阅读(1196) 评论(0) 推荐(0) 编辑
摘要:select模型 ////////////////////////////////////////////////////// // select.cpp文件 #include "InitSock.h" #include <stdio.h> #include <windows.h> CInitSoc 阅读全文
posted @ 2020-07-07 15:48 yukiyuna 阅读(159) 评论(0) 推荐(0) 编辑
摘要:////////////////////////////////////////////////////////// // TCPClient.cpp文件 #include <stdio.h> #include "InitSock.h" CInitSock initSock; // 初始化Winso 阅读全文
posted @ 2020-07-06 14:10 yukiyuna 阅读(772) 评论(0) 推荐(0) 编辑
摘要:WINDOWS下最好的方式是用VirtualAlloc分配内存,他不是在堆,也不是栈,而是直接在进程的地址空间中保留一快内存,虽然用起来最不方便。但是速度快,也最灵活 new,malloc,GlobalAlloc详解相同点:都可用于申请动态内存和释放内存 不同点:(1)操作对象有所不同。malloc 阅读全文
posted @ 2020-07-05 10:33 yukiyuna 阅读(253) 评论(0) 推荐(0) 编辑
摘要:int main() { char name[256]; gethostname(name, sizeof(name)); in_addr addr; addrinfo* res; addrinfo hints; memset(&hints, 0, sizeof(struct addrinfo)); 阅读全文
posted @ 2020-07-03 10:54 yukiyuna 阅读(611) 评论(0) 推荐(0) 编辑