网络编程
文章平均质量分 53
paovspao
这个作者很懒,什么都没留下…
展开
-
网络编程API函数描写
一、gethostname //获取本地主机名称 用法: char szHost[256]; //获取本地主机名称 ::gethostname(szHost, sizeof(szHost)); 二、gethostbyname // 通过主机名得到地址信息 用法: hostent *pHost = ::gethostbyname(szHost); //打印所有的IP地址 in_原创 2015-10-28 15:04:32 · 276 阅读 · 0 评论 -
UNIX网络编程 时间服务
通过客户端访问服务器获取服务器当前时间的程序初步了解UNIX网络编程套接字。客户端代码如下://unp.h头文件包含了需要头文件和相关宏定义#include "unp.h"#define MAXLENE 1024 void err_quit(const char* str, ...); void err_sys(const char* str, ...);int main(int argc...原创 2018-05-17 22:31:36 · 123 阅读 · 0 评论