Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/zmq/sugar/__pycache__/frame.cpython-39.pyc
Ðазад
a a�h� � @ sN d Z ddlmZ ddlmZ ddlZdd� ZG dd � d ee�ZeZd d gZ dS )z0MQ Frame pure Python methods.� )�AttributeSetter� )�FrameNc C s$ t j�| |� t js td| ��d S )Nz8libzmq and pyzmq must be built with draft support for %s)�zmq�errorZ_check_versionZ DRAFT_API�RuntimeError)�v�feature� r �/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/zmq/sugar/frame.py�_draft s r c @ sL e Zd ZdZdd� Zedd� �Zejdd� �Zedd� �Zejd d� �Zd S )r a� Frame(data=None, track=False, copy=None, copy_threshold=zmq.COPY_THRESHOLD) A zmq message Frame class for non-copy send/recvs. This class is only needed if you want to do non-copying send and recvs. When you pass a string to this class, like ``Frame(s)``, the ref-count of `s` is increased by two: once because the Frame saves `s` as an instance attribute and another because a ZMQ message is created that points to the buffer of `s`. This second ref-count increase makes sure that `s` lives until all messages that use it have been sent. Once 0MQ sends all the messages and it doesn't need the buffer of s, 0MQ will call ``Py_DECREF(s)``. Parameters ---------- data : object, optional any object that provides the buffer interface will be used to construct the 0MQ message data. track : bool [default: False] whether a MessageTracker_ should be created to track this object. Tracking a message has a cost at creation, because it creates a threadsafe Event object. copy : bool [default: use copy_threshold] Whether to create a copy of the data to pass to libzmq or share the memory with libzmq. If unspecified, copy_threshold is used. copy_threshold: int [default: zmq.COPY_THRESHOLD] If copy is unspecified, messages smaller than this many bytes will be copied and messages larger than this will be shared with libzmq. c C s | � |�S )N)�get)�self�keyr r r �__getitem__1 s zFrame.__getitem__c C s t dd� | �d�S )z�The RADIO-DISH group of the message. Requires libzmq >= 4.2 and pyzmq built with draft APIs enabled. .. versionadded:: 17 �� � � RADIO-DISH�group�r r �r r r r r 5 s zFrame.groupc C s t dd� | �d|� d S )Nr r r �r �set)r r r r r r @ s c C s t dd� | �d�S )z�The CLIENT-SERVER routing id of the message. Requires libzmq >= 4.2 and pyzmq built with draft APIs enabled. .. versionadded:: 17 r � CLIENT-SERVER� routing_idr r r r r r E s zFrame.routing_idc C s t dd� | �d|� d S )Nr r r r )r r r r r r P s N) �__name__� __module__�__qualname__�__doc__r �propertyr �setterr r r r r r s r �Message) r Z attrsettrr Zzmq.backendr Z FrameBaser r r"