![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linux网络编程
文章平均质量分 77
Tina_Chan
这个作者很懒,什么都没留下…
展开
-
关于网络接口的ioctl使用
本文转自:http://hi.baidu.com/kevert/blog/item/4c95b052b86bb10e0cf3e3c8.html ioctl函数(1) 2007-02-09 16:45 ioctl函数 本函数影响由fd参数引用的一个打开的文件。 #include int ioctl( int fd, int request, .../*转载 2012-05-05 18:31:15 · 680 阅读 · 0 评论 -
linux名称解析函数简介——gethostbyname与getaddrinfo
使用这个东西,首先要包含2个头文件: #include #include struct hostent *gethostbyname(const char *name); 这个函数的传入值是域名或者主机名,例如"www.google.com","wpc"等等。 传出值,是一个hostent的结构(如下)。如果函数调用失败,将返回NULL。 struct hostent {转载 2012-05-25 18:08:10 · 7747 阅读 · 0 评论 -
pthread_rwlock读写锁的使用细节
在使用的过程中,往往会有一些细节上的疑问,心中会有模棱两可的地方,然后自己做了试验,并记录下来。 首先,我们先来看一下 pthread_rwlock_t 结构体的定义: struct { int __lock; unsigned int __nr_readers; unsigned int __readers_wakeup; unsign原创 2013-04-13 22:45:55 · 12075 阅读 · 0 评论