随笔分类 -  Linux编程

摘要:简介 github: https://github.com/curl/curl 官网: https://curl.se/libcurl/c/ 编译: ./configure --prefix=$PWD/../install make make install 框架 参考: 1. https://bl 阅读全文
posted @ 2021-10-26 08:23 Vzf 阅读(1468) 评论(0) 推荐(0)
摘要:运行 run:简记为 r ,其作用是运行程序,当遇到断点后,程序会在断点处停止运行,等待用户输入下一步的命令。 continue (简写c ):继续执行,到下一个断点处(或运行结束) next:(简写 n),单步跟踪程序,当遇到函数调用时,也不进入此函数体;此命令同 step 的主要区别是,step 阅读全文
posted @ 2021-10-11 11:12 Vzf 阅读(296) 评论(0) 推荐(0)
摘要:1. socket的TIMEOUT #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdlib.h> #include <assert.h 阅读全文
posted @ 2021-05-16 15:06 Vzf 阅读(73) 评论(0) 推荐(0)
摘要:1. 统一事件源: 1 #include <sys/types.h> 2 #include <sys/socket.h> 3 #include <netinet/in.h> 4 #include <arpa/inet.h> 5 #include <assert.h> 6 #include <stdi 阅读全文
posted @ 2021-05-15 15:13 Vzf 阅读(62) 评论(0) 推荐(0)
摘要:select系统调用 #include <sys/select.h> int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout); nfds:是指集合中所有文件 阅读全文
posted @ 2021-04-17 20:38 Vzf 阅读(80) 评论(0) 推荐(0)
摘要:1.接受tcp数据 #include <sys/socket.h> ssize_t recv(int socket, void *buffer, size_t length, int flags); socket:读取的socket文件描述符 buffer:缓冲区的位置 length:缓冲区的大小 阅读全文
posted @ 2021-03-20 21:43 Vzf 阅读(143) 评论(0) 推荐(0)
摘要:创建 socket #include <sys/types.h> /* See NOTES */ #include <sys/socket.h> int socket(int domain, int type, int protocol); domain:使用哪个协议簇,PF_UNIX: UNIX本 阅读全文
posted @ 2021-02-28 16:24 Vzf 阅读(391) 评论(0) 推荐(0)