File: //usr/lib/python3/dist-packages/twisted/internet/__pycache__/posixbase.cpython-38.pyc
U
�b�k � @ s� d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z m
Z
mZmZ ddl
mZmZmZ ddlmZmZ ddlmZmZmZmZmZmZmZmZmZmZ ddlm Z m!Z! dd l"m#Z#m$Z$m%Z% dd
l&m'Z'm(Z( e�)d�Z*e�)d�Z+zdd
l,m-Z. W n e/k
�r dZ-Y nX e.Z-zddl
m0Z1 W n e/k
�rF dZ0Y nX e1Z0e(dkZ2dZ3e2�rzddl
m4Z4m5Z5m6Z6m7Z7 dZ3e'�8� �r�zddl9Z9dZ3W n e/k
�r� dZ9Y nX G dd� de
�Z:ee:�G dd� de$j;��Z<G dd� de$j;�Z=ee:�G dd� de=��Z>e(dk�re>Z?ne<Z?G dd� de=�Z@G dd� d�ZAeeee�G dd � d eeAe��ZBG d!d"� d"�ZCee�G d#d$� d$eCeA��ZDe-dk �s�e0dk �r�eeBe� e2�r�eeBee� e3�r�eeBe� eEed%d�dk �r�eeBe� d gZFdS )&z
Posix reactor base class
� N)�Sequence)� Attribute� Interface�classImplements�implementer)�error�tcp�udp)�ReactorBase�_SignalReactorMixin)
�IHalfCloseableDescriptor�
IReactorFDSet�IReactorMulticast�IReactorProcess�IReactorSocket�IReactorSSL�IReactorTCP�IReactorUDP�IReactorUNIX�IReactorUNIXDatagram)�CONNECTION_DONE�CONNECTION_LOST)�failure�log�util)�platform�platformTypezHandler has no fileno methodzFile descriptor lost)�tls)�ssl�posixF)�_signals�fdesc�process�unixTc @ s8 e Zd ZdZed�Zdd� Zdd� Zej d�dd �Z
d
S )�_IWakeraQ
Interface to wake up the event loop based on the self-pipe trick.
The U{I{self-pipe trick}<http://cr.yp.to/docs/selfpipe.html>}, used to wake
up the main loop from another thread or a signal handler.
This is why we have wakeUp together with doRead
This is used by threads or signals to wake up the event loop.
� c C s dS )z:
Called when the event should be wake up.
N� r&