File: //usr/lib/python3/dist-packages/twisted/internet/__pycache__/protocol.cpython-38.pyc
U
��W[�i � @ s d Z ddlmZmZ ddlZddlmZ ddlmZm Z m
Z
ddlmZm
Z
mZ ddlmZ ddlmZ eejej�eG d d
� d
���ZG dd� de�ZG d
d� de�ZeG dd� d��ZG dd� de�ZG dd� de�ZeG dd� d��Ze �e
�� �Ze�� eej ej�G dd� de��Z!eej"�G dd� de
j#��Z$e
�%e$ej ej"� eej �G dd� de
j#��Z&e
�%e&ej"ej � eej'�G dd� de��Z(eG dd � d ��Z)eej�G d!d"� d"e)��Z*G d#d$� d$e*�Z+eej,�eG d%d&� d&���Z-d
ddd'ddd&dd d"d$dgZ.dS )(z�
Standard implementations of Twisted protocol-related interfaces.
Start here if you are looking to write a new protocol implementation for
Twisted. The Protocol class contains some introductory material.
� )�division�absolute_importN)�implementer)�log�failure�
components)�
interfaces�error�defer)�
_loggerFor)� _oldStylec @ sX e Zd ZdZdZdZdZedd� �Zdd� Z d d
� Z
dd� Zd
d� Zdd� Z
dd� ZdS )�Factoryz�
This is a factory which produces protocols.
By default, buildProtocol will create a protocol of the class given in
self.protocol.
Nr Tc O s | ||�}||_ |S )a�
Create a factory for the given protocol.
It sets the C{protocol} attribute and returns the constructed factory
instance.
@param protocol: A L{Protocol} subclass
@param args: Positional arguments for the factory.
@param kwargs: Keyword arguments for the factory.
@return: A L{Factory} instance wired up to C{protocol}.
)�protocol)�clsr �args�kwargs�factory� r �;/usr/lib/python3/dist-packages/twisted/internet/protocol.py�forProtocol'