当前位置: 首页>>代码示例>>Python>>正文


Python AMQPWriter.write_longstr方法代码示例

本文整理汇总了Python中serialization.AMQPWriter.write_longstr方法的典型用法代码示例。如果您正苦于以下问题:Python AMQPWriter.write_longstr方法的具体用法?Python AMQPWriter.write_longstr怎么用?Python AMQPWriter.write_longstr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在serialization.AMQPWriter的用法示例。


在下文中一共展示了AMQPWriter.write_longstr方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _x_start_ok

# 需要导入模块: from serialization import AMQPWriter [as 别名]
# 或者: from serialization.AMQPWriter import write_longstr [as 别名]
    def _x_start_ok(self, client_properties, mechanism, response, locale):
        """
        select security mechanism and locale

        This method selects a SASL security mechanism. ASL uses SASL
        (RFC2222) to negotiate authentication and encryption.

        PARAMETERS:
            client_properties: table

                client properties

            mechanism: shortstr

                selected security mechanism

                A single security mechanisms selected by the client,
                which must be one of those specified by the server.

                RULE:

                    The client SHOULD authenticate using the highest-
                    level security profile it can handle from the list
                    provided by the server.

                RULE:

                    The mechanism field MUST contain one of the
                    security mechanisms proposed by the server in the
                    Start method. If it doesn't, the server MUST close
                    the socket.

            response: longstr

                security response data

                A block of opaque data passed to the security
                mechanism. The contents of this data are defined by
                the SASL security mechanism.  For the PLAIN security
                mechanism this is defined as a field table holding two
                fields, LOGIN and PASSWORD.

            locale: shortstr

                selected message locale

                A single message local selected by the client, which
                must be one of those specified by the server.

        """
        args = AMQPWriter()
        args.write_table(client_properties)
        args.write_shortstr(mechanism)
        args.write_longstr(response)
        args.write_shortstr(locale)
        self._send_method((10, 11), args)
开发者ID:vukasin,项目名称:py-amqplib,代码行数:58,代码来源:connection.py

示例2: _x_secure_ok

# 需要导入模块: from serialization import AMQPWriter [as 别名]
# 或者: from serialization.AMQPWriter import write_longstr [as 别名]
    def _x_secure_ok(self, response):
        """
        security mechanism response

        This method attempts to authenticate, passing a block of SASL
        data for the security mechanism at the server side.

        PARAMETERS:
            response: longstr

                security response data

                A block of opaque data passed to the security
                mechanism.  The contents of this data are defined by
                the SASL security mechanism.

        """
        args = AMQPWriter()
        args.write_longstr(response)
        self._send_method((10, 21), args)
开发者ID:vukasin,项目名称:py-amqplib,代码行数:22,代码来源:connection.py


注:本文中的serialization.AMQPWriter.write_longstr方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。