(self)
return enc('\r\n'.join(request))
Prepare the request to be sent for the upgrade handshake.
Prepare the request to be sent for the upgrade handshake.
Prepare the request to be sent for the upgrade handshake .
def handshake_request(self):
        """
        Prepare the request to be sent for the upgrade handshake.
        """
        headers = self.handshake_headers
        request = ["GET %s HTTP/1.1" % self.resource]
        for header, value in headers:
            request.append("%s: %s" % (header, value))
        request.append('\r\n')

        return enc('\r\n'.join(request))
def handshake_request ( self ) : headers = self . handshake_headers request = [ "GET %s HTTP/1.1" % self . resource ] for header , value in headers : request . append ( "%s: %s" % ( header , value ) ) request . append ( '\r\n' ) return enc ( '\r\n' . join ( request ) )