Ticket #3198: 3198-iocp.diff

File 3198-iocp.diff, 1.7 KB (added by therve, 8 years ago)
  • twisted/internet/iocpreactor/tcp.py

     
    147147                except socket.error, se:
    148148                    raise error.ConnectBindError(se[0], se[1])
    149149                self.socket = skt
    150                 Connection.__init__(self, skt, None)
     150                Connection.__init__(self, skt, None, reactor)
    151151                reactor.callLater(0, self.resolveAddress)
    152152        except error.ConnectBindError, err:
    153153            reactor.callLater(0, self.failIfNotConnected, err)
     
    266266    """
    267267
    268268
    269     def __init__(self, sock, protocol, clientAddr, serverAddr, sessionno):
     269    def __init__(self, sock, protocol, clientAddr, serverAddr, sessionno, reactor):
    270270        """
    271271        Server(sock, protocol, client, server, sessionno)
    272272
     
    274274        tuple of host, port describing the other end of the connection), an
    275275        instance of Port, and a session number.
    276276        """
    277         Connection.__init__(self, sock, protocol)
     277        Connection.__init__(self, sock, protocol, reactor)
    278278        self.serverAddr = serverAddr
    279279        self.clientAddr = clientAddr
    280280        self.sessionno = sessionno
     
    468468                transport = Server(evt.newskt, protocol,
    469469                        address.IPv4Address('TCP', rAddr[0], rAddr[1], 'INET'),
    470470                        address.IPv4Address('TCP', lAddr[0], lAddr[1], 'INET'),
    471                         s)
     471                        s, self.reactor)
    472472                protocol.makeConnection(transport)
    473473            return True
    474474