Beispiel #1
0
    def __init__(self, socket):
        Transport.__init__(self)

        def connect(self):
            self.sock = socket

        connection = six.moves.http_client.HTTPConnection
        connection.connect = connect
Beispiel #2
0
    def __init__(self, socket):
        Transport.__init__(self)

        def connect(self):
            self.sock = socket

        connection = six.moves.http_client.HTTPConnection
        connection.connect = connect
 def __init__(self, *args, **kwargs):
     self.socket_path = kwargs.pop('socket_path', '')
     Transport.__init__(self, *args, **kwargs)
Beispiel #4
0
 def make_connection(self, host):
     conn = Transport.make_connection(self, host)
     conn.timeout = self._timeout
     return conn
Beispiel #5
0
 def __init__(self, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, *args, **kwargs):
     Transport.__init__(self, *args, **kwargs)
     self._timeout = timeout
Beispiel #6
0
    def make_connection(self, host):
        c = Transport.make_connection(self, host)
        c.timeout = self.timeout

        return c
Beispiel #7
0
 def __init__(self, timeout, *args, **kwargs):
     Transport.__init__(self, *args, **kwargs)
     self.timeout = timeout
 def __init__(self, *args, **kwargs):
     self.socket_path = kwargs.pop("socket_path", "")
     Transport.__init__(self, *args, **kwargs)