'Create (or recreate) the actual socket object.'

def bind(self, family, type, proto=0):

    self.socket = socket.socket(family, type, proto)
    prevent_socket_inheritance(self.socket)
    self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    if (self.nodelay and (not isinstance(self.bind_addr, str))):
        self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
    if (self.ssl_adapter is not None):
        self.socket = self.ssl_adapter.bind(self.socket)
    if (hasattr(socket, 'AF_INET6') and (family == socket.AF_INET6) and (self.bind_addr[0] in ('::', '::0', '::0.0.0.0'))):
        try:
            self.socket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 0)
        except (AttributeError, socket.error):
            pass
    self.socket.bind(self.bind_addr)
