点击中转:level取值说明
The level argument specifies the protocol level at which the option resides. To retrieve options at the socket level, specify the level argument as SOL_SOCKET. To retrieve options at other levels, supply the appropriate protocol number for the protocol controlling the option. For example, to indicate that an option will be interpreted by the TCP (Transport Control Protocol), set level to the protocol number of TCP,
翻译之后如下:
level参数指定选项所在的协议级别。 要在套接字级别检索选项,请将级别参数指定为SOL_SOCKET。 要检索其他级别的选项,请为控制该选项的协议提供适当的协议编号。 例如,要指示选项将由TCP(传输控制协议)解释,请将级别设置为TCP的协议号