(self)
return headers
List of headers appropriate for the upgrade
        handshake.
List of headers appropriate for the upgrade
        handshake.
List of headers appropriate for the upgrade handshake .
def handshake_headers(self):
        """
        List of headers appropriate for the upgrade
        handshake.
        """
        headers = [
            ('Host', self.host),
            ('Connection', 'Upgrade'),
            ('Upgrade', 'websocket'),
            ('Sec-WebSocket-Key', dec(self.key)),
            ('Origin', self.url),
            ('Sec-WebSocket-Version', str(max(WS_VERSION)))
            ]

        if self.protocols:
            headers.append(('Sec-WebSocket-Protocol', ','.join(self.protocols)))

        return headers
def handshake_headers ( self ) : headers = [ ( 'Host' , self . host ) , ( 'Connection' , 'Upgrade' ) , ( 'Upgrade' , 'websocket' ) , ( 'Sec-WebSocket-Key' , dec ( self . key ) ) , ( 'Origin' , self . url ) , ( 'Sec-WebSocket-Version' , str ( max ( WS_VERSION ) ) ) ] if self . protocols : headers . append ( ( 'Sec-WebSocket-Protocol' , ',' . join ( self . protocols ) ) ) return headers