zoukankan      html  css  js  c++  java
  • Linux网络编程常用头文件

    // 网络编程常用头文件
    #include <unistd.h>
    #include <sys/types.h>
    #include <sys/socket.h>
    #include <netdb.h>
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <ctype.h>
    #include <errno.h>
    #include <malloc.h>
    #include <netinet/in.h>
    #include <arpa/inet.h>
    #include <sys/ioctl.h>
    #include <stdarg.h>
    #include <fcntl.h>
    
    // 与用户权限及密码验证相关的头文件
    // 注意增加编译选项 -lcrypt
    #include <shadow.h>
    #include <crypt.h>
    #include <pwd.h>
    
    // 与文件和时间相关的头文件
    #include <sys/time.h>
    #include <utime.h>
    #include <time.h>
    #include <sys/stat.h>
    #include <sys/file.h>
    
    // 与多进程操作相关的头文件
    #include <sys/wait.h>
    #include <sys/ipc.h>
    #include <sys/shm.h>
    #include <signal.h>
    
    // 与多线程相关的头文件
    // 注意,应在编译时链接线程库,增加编译选项 -lthread
    #include <pthread.h>
    #include <sys/poll.h>

    具体每个头文件的用处,请看此处

  • 相关阅读:
    15、线程
    17、lambda表达式
    16、sockect
    14、反射(reflect)
    13、集合2
    java 基本类型、包装类、字符串之间的转换
    13、集合1
    12、NIO、AIO、BIO二
    12、NIO、AIO、BIO一
    11、流与文件
  • 原文地址:https://www.cnblogs.com/lnlin/p/9277142.html
Copyright © 2011-2022 走看看