
June 15, 2002
4:04 p.m.
Background: Ivo pointed out there's no way to differentiate between "no such hostname" and "connection refused". For that matter, connectionFailed has nothing to do with the protocol - why are we doing a callback on the protocol at all? It shouldn't be created if no connection was made. Proposal: reactor.clientTCP accepts a protocol factory instead of a protocol, and only makes a protocol instance if connection was made. Additionally, it accepts an additional argument, failureCallback, which will get called with a status code (CONNECTION_REFUSED, NO_SUCH_HOSTNAME) or something when the connection fails. Protocol.connectionFailed goes bye-bye. Comments?