文章目录
- corked
- 实例
- socket
- 相关socket的配置一个
- socket选项一个
corked
a. 塞子塞住的, 用软木塞炭涂黑的, 有塞子气味的, (美)(非正式)喝醉酒的
<— 牛津现代英汉双解词典 —>
adj (of wine) made bad by a decayed cork (指酒)有腐坏的软木塞异味的.
实例
/net/ipv6/udp.c
* The socket lock must be held while it’s corked.
这里是说socket将要被塞住,需要获取锁。
这里看着也只有cork配的上socket;因为socket是套接字,上一个管子,可以被塞。
socket
n. 窝, 穴, 插座, 眼窝
vt. 插进插座
【计】 套接字
【化】 承窝
【医】 槽, 臼, 窝
相关socket的配置一个
tcp_autocorking - BOOLEAN
Enable TCP auto corking :
When applications do consecutive small write()/sendmsg() system calls,
we try to coalesce these small writes as much as possible, to lower
total amount of sent packets. This is done if at least one prior
packet for the flow is waiting in Qdisc queues or device transmit
queue. Applications can still use TCP_CORK for optimal behavior
when they know how/when to uncork their sockets.
Default : 1
socket选项一个
/* cork the socket */
kernel_setsockopt(ssocket, SOL_TCP, TCP_CORK,(char *)&val, sizeof(val));