'@param connectedDeferred: The L{Deferred} that will callback
with the C{wrappedProtocol} when it is connected.
@param wrappedProtocol: An L{IProtocol} provider that will be
connected.'

def __init__(self, connectedDeferred, wrappedProtocol):

    self._connectedDeferred = connectedDeferred
    self._wrappedProtocol = wrappedProtocol
    for iface in [interfaces.IHalfCloseableProtocol, interfaces.IFileDescriptorReceiver, interfaces.IHandshakeListener]:
        if iface.providedBy(self._wrappedProtocol):
            directlyProvides(self, iface)
