08 2021 档案
摘要:基于UDP的数据I/O函数 //成功时返回传入的字节数,失败时返回-1 ssize_t sendto (int __fd, const void *__buf, size_t __n, int __flags, __CONST_SOCKADDR_ARG __addr, socklen_t __add
阅读全文
摘要:IPv4地址的结构体 /* Fixed-size types, underlying types depend on word size and compiler. */ typedef signed char __int8_t; typedef unsigned char __uint8_t; t
阅读全文
摘要:服务端套接字创建过程 第一步:调用socket函数创建套接字 //成功时返回文件表述符,失败时返回-1 int socket(int __domain, int __type, int __protocol) domain:套接字使用的协议族(Protocol Family)信息; type:套接字
阅读全文