会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
川页科技
2019年4月21日
getnameinfo函数
摘要: 一、函数原型 二、可指定的flags标志值
阅读全文
posted @ 2019-04-21 13:43 soldierback
阅读(3288)
评论(0)
推荐(0)
tcp_listen函数
摘要: #include #include #include #include #include #define LISTENQ 1024 int tcp_listen(const char *host, const char *serv, socklen_t *addrlenp) { int liste...
阅读全文
posted @ 2019-04-21 13:35 soldierback
阅读(1006)
评论(0)
推荐(0)
tcp_connect函数
摘要: #include #include #include #include #include int tcp_connect(const char *host, const char *serv) { int sockfd, n; struct addrinfo hints, *res, *ressave;...
阅读全文
posted @ 2019-04-21 13:35 soldierback
阅读(2101)
评论(0)
推荐(0)
udp_server函数
摘要: #include #include #include #include #include int udp_server(const char *host, const char *serv, socklen_t *addrlenp) { int sockfd, n; struct addrinfo hi...
阅读全文
posted @ 2019-04-21 13:34 soldierback
阅读(549)
评论(0)
推荐(0)
udp_connect函数
摘要: #include #include #include #include #include int udp_connect(const char *host, const char *serv) { int sockfd, n; struct addrinfo hints, *res, *ressave...
阅读全文
posted @ 2019-04-21 13:34 soldierback
阅读(435)
评论(0)
推荐(0)
udp_client函数
摘要: #include #include #include #include #define SA struct sockaddr int udp_client(const char *host, const char *serv, SA **saptr, socklen_t *lenp) { int sockf...
阅读全文
posted @ 2019-04-21 13:33 soldierback
阅读(644)
评论(0)
推荐(0)
gai_strerror函数
摘要: 一、函数原型 二、由getaddrinfo返回的非0错误值的名字和含义
阅读全文
posted @ 2019-04-21 12:02 soldierback
阅读(1446)
评论(0)
推荐(0)
getaddrinfo函数
摘要: 一、功能 对于IPv4和IPv6均适用,可以处理名字到地址以及服务到端口这两种变换,返回的是一个sockaddr结构而不是一个地址队列 二、函数原型 (1)hostname:是一个主机名或地址串 (2)service:是一个服务名或十进制端口号数串 (3)hints:一个空指针或指向某个addrin
阅读全文
posted @ 2019-04-21 11:43 soldierback
阅读(733)
评论(0)
推荐(0)
SCTP一到多式流分回射服程序
摘要: 一、服务器程序 二、客户端程序
阅读全文
posted @ 2019-04-21 11:21 soldierback
阅读(553)
评论(0)
推荐(0)
gethostbyname和gethostbyaddr
摘要: 一、gethostbyname函数原型 二、hostent结构 三、关于全局整体变量h_errno 当gethostbyname发生错误时,它不设置errno变量,而是将全局变量h_errno设置为<netdb.h>中定义的下列常值之一: (1)HOST_NOT_FOUND; (2)TRY_AGAI
阅读全文
posted @ 2019-04-21 11:16 soldierback
阅读(626)
评论(0)
推荐(0)
公告
导航
博客园
首页
新随笔
新文章
联系
订阅
管理