'Once the streams are established, attempt to handshake
with the server to be accepted as a component.
:param xml: The incoming stream\'s root element.'

def start_stream_handler(self, xml):

    BaseXMPP.start_stream_handler(self, xml)
    sid = xml.get('id', '')
    pre_hash = ('%s%s' % (sid, self.secret))
    if (sys.version_info >= (3, 0)):
        pre_hash = bytes(pre_hash, 'utf-8')
    handshake = ET.Element('{jabber:component:accept}handshake')
    handshake.text = hashlib.sha1(pre_hash).hexdigest().lower()
    self.send_xml(handshake, now=True)
