使用Python找出本机支持的socket列表

#!/usr/bin/env python
# Get list of available socket options -- Chapter 3 -- sockopts.py
import socket
solist = [x for x in dir(socket) if x.startswith('SO_')]
solist.sort()
for x in solist:
    print x
原文地址:https://www.cnblogs.com/djcsch2001/p/2035201.html