intdata=42; size_tcontrol_buffer_size=CMSG_SPACE(sizeof(int)); CMSG_SPACE(sizeof(int))表示要发送一个整型值需要占用的总空间大小。在计算过程中,会考虑到操作系统特定的对齐要求以及必要的填充字节。 请注意,CMSG_SPACE是一个宏定义在<sys/socket.h>头文件中,因此在使用之前需要引入该头文件。 内容由零...
socket_cmsg_space— Calculate message buffer size说明 ¶ socket_cmsg_space(int $level, int $type, int $num = 0): ?int Calculates the size of the buffer that should be allocated for receiving the ancillary data. 警告 本函数还未编写文档,仅有参数列表。参数...
socket_cmsg_space(int$level,int$type,int$num= 0):?int Calculates the size of the buffer that should be allocated for receiving the ancillary data. Warning This function is currently not documented; only its argument list is available.
CMSG_SPACE(n) self.assertGreaterEqual(ret, last) self.assertGreaterEqual(ret, socket.CMSG_LEN(n)) self.assertGreaterEqual(ret, n + socket.CMSG_LEN(0)) self.assertLessEqual(ret, self.socklen_t_limit) last = ret self.assertRaises(OverflowError, socket.CMSG_SPACE, -1) # sendmsg() shares...
socket_cmsg_space—Calculate message buffer size 说明¶ socket_cmsg_space(int$level,int$type,int$num= 0):?int Calculates the size of the buffer that should be allocated for receiving the ancillary data. 警告 本函数还未编写文档,仅有参数列表。