![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
网络编程卷1-套接字API
llongint
这个作者很懒,什么都没留下…
展开
-
套接口地址结构-ipv4
引言:不知道大家又没有遇到过这种情况,就是比如我想打印根据连接套接字打印点分形式的ip地址(如127.0.0.1),我知道我应该调用inet_ntoa(),然后去看man手册,是这样的:char *inet_ntoa(struct in_addr in);然后我知道我应该传一个struct in_addr的结构体/* Internet address. */typedef uint32_t in_addr_t;struct in_addr{ in_addr_t s_addr;};原创 2020-12-02 23:08:55 · 395 阅读 · 0 评论 -
epoll---简单服务器
#include <stdio.h>#include <stdlib.h>#include <sys/types.h>#include <sys/socket.h>#include <sys/epoll.h>#include <unistd.h&原创 2018-08-07 21:28:40 · 126 阅读 · 0 评论 -
EPOLL_WAIT(2) Linux Programmer's Manual EPOLL_WAIT(2)
NAME epoll_wait, epoll_pwait - wait for an I/O event on an epoll file descriptorSYNOPSIS#include <sys/epoll.h>int epoll_wait(int epfd, struct epoll_event *events,int maxeve...原创 2018-08-07 14:27:36 · 648 阅读 · 0 评论 -
EPOLL_CREATE(2) Linux Programmer's Manual EPOLL_CREATE(2)
名字 epoll_create, epoll_create1 - open an epoll file descriptor梗概#include <sys/epoll.h>int epoll_create(int size);int epoll_create1(int flags);描述: epoll_create() creates an ...原创 2018-08-07 13:24:26 · 201 阅读 · 0 评论 -
EPOLL_CTL(2) Linux Programmer's Manual POLL_CTL(2)
EPOLL_CTL(2) Linux Programmer’s Manual POLL_CTL(2)NAME epoll_ctl - control interface for an epoll descriptorSYNOPSIS#include &lt;sys/epoll.h&gt;int epoll_ctl(int epfd, int op, int fd,...原创 2018-08-07 12:58:43 · 279 阅读 · 0 评论 -
网络编程基础知识
网络协议层次结构 分层: layer“层”: 功能模块。软件设计方法学,主张把一个大的复杂的工程分成不同的代码码,实现不同的功能。功能模块(function)OSI七层模型:应用层表示层会话层传输层网络层数据链路层物理层TCP/IP协议的四层模型应用层网络应用程序的私有协议:传输层(tcp, udp)传输层,规定数据是怎么如何传输的TCP: Transport C...原创 2018-08-01 16:34:40 · 210 阅读 · 0 评论 -
网络协议
1.计算机网络体系结构 层次参考模型 5 应用层:各种应用层协议如DNS、HTTP、POP、TELNET、FTP、SMTP等 4 运输层(TCP或UDP):向 两台主机中进程之间的通信 提供 通用的数据传输 服务 ,,使用的中间设备叫 网关 3 网络层:(IP、ARP、RARP、ICMP)把运输层产生的报文或用户数据报封装成 分组 或...原创 2018-07-31 15:58:23 · 275 阅读 · 0 评论 -
《UNIX网络编程卷1》--笔记
1. 简介POSIX:Portable Operating System Interface of UNIX,即可移植操作系统接口ISO:International Organization for Standardization,即国际标准化组织IEC:International Electrotechnical Commission,即国际电工委员会Inc:the Institut...原创 2018-05-23 17:04:16 · 4345 阅读 · 0 评论