The two most common transport layer protocols are the transmission control protocol (TCP) and the user datagram protocol (UDP). One of the main differences between the two protocols is reliability.
本文首先从宏观上概述了数据包发送的流程,接着分析了协议层注册进内核以及被socket的过程,最后介绍了通过 socket 发送网络数据的过程。 协议族处理:数据穿过协议层,这一过程(在许多情况下)会将数据(data)转换成数据包(packet) 数据穿过路由层,这 ...
本文分享了Linux内核网络数据包发送在UDP协议层的处理,主要分析了udp_sendmsg和udp_send_skb函数,并分享了UDP层的数据统计和监控以及socket发送队列大小的调优。 这个函数定义在 net/ipv4/udp.c,函数很长,分段来看。 udp_sendmsg 代码检查 up->pending 以确定 socket 当前是否 ...
In "Read and write data with Java's I/O streams," we started to explore the input/output (I/O) classes, interfaces, and operations provided by the Java platform. Now, we'll continue our exploration of ...