def connectionMade(self):
headers = [<EOL>"<STR_LIT>" % ("<STR_LIT>" % self.factory.get_stream().get_room_id())<EOL>]<EOL>connection_headers = self.factory.get_stream().get_connection().get_headers()<EOL>for header in connection_headers:<EOL><INDENT>headers.append("<STR_LIT>" % (header, connection_headers[header]))<EOL><DEDENT>headers.append("<STR_LIT>")<EOL>self.transport.write("<STR_LIT:\r\n>".join(headers) + "<STR_LIT>")<EOL>self.factory.get_stream().set_protocol(self)<EOL>
Called when a connection is made, and used to send out headers