'Send a HyBi-00 preamble.'

def sendHyBi00Preamble(self):

    protocol = ('wss' if self.isSecure() else 'ws')
    self.sendCommonPreamble()
    self.transport.writeSequence([('Sec-WebSocket-Origin:    %s\r\n' % self.origin), ('Sec-WebSocket-Location:    %s://%s%s\r\n' % (protocol, self.host, self.location)), ('WebSocket-Protocol:    %s\r\n' % self.codec), ('Sec-WebSocket-Protocol:    %s\r\n' % self.codec), '\r\n'])
