'Called when the transport connection has been established.
Here we optionally set up traffic logging (depending on L{logTraffic})
and call each handler\'s C{makeConnection} method with the L{XmlStream}
instance.'

def _connected(self, xs):

    def logDataIn(buf):
        log.msg(('RECV:    %r' % buf))
    def logDataOut(buf):
        log.msg(('SEND:    %r' % buf))
    if self.logTraffic:
        xs.rawDataInFn = logDataIn
        xs.rawDataOutFn = logDataOut
    self.xmlstream = xs
    for e in self:
        e.makeConnection(xs)
