- 8
- 0
- 约2.18万字
- 约 82页
- 2018-03-09 发布于河南
- 举报
第二讲 套接口基础
Lecture 2: Elementary Sockets Ren Liyong School of Computer Science Contents Basic of Sockets Structure of Sockets Socket APIs TCP C/S example UDP C/S example Name and Address Conversions 套接字概述 UNIX网络编程的两个方向:Socket,TLI 套接字是一种网络API,程序员可以用之开发网络程序。 套接字类型 套接字支持多种通信协议: Unix:Unix系统内部协议 INET:IP版本4 INET6:IP版本6 套接字类型,即应用程序希望的通信服务类型 SOCKET_STREAM:双向可靠数据流,对应TCP SOCKET_DGRAM:双向不可靠数据报,对应UDP SOCKET_RAW:是低于传输层的低级协议或物理网络提供的套接字类型,可以访问内部网络接口。 Socket Address Structures(IPv4) Most socket functions require a pointer to a socket address structure as an argument. Each supported protocol suite defines its o
原创力文档

文档评论(0)