python的socket底层是怎样实现的?我看_socket的类方法全是pass?

新手上路,请多包涵

class SocketType(object):

def bind(self, address): # real signature unknown; restored from __doc__
    """
    bind(address)
    
    Bind the socket to a local address.  For IP sockets, the address is a
    pair (host, port); the host must refer to the local host. For raw packet
    sockets the address is a tuple (ifname, proto [,pkttype [,hatype]])
    """
    pass

def close(self): # real signature unknown; restored from __doc__
    """
    close()
    
    Close the socket.  It cannot be used after this call.
    """
    pass
阅读 2.8k
2 个回答

这个大概是父类,具体的实现在其他类或者是用C语言拓展实现的

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题