Edit file File name : windows_utils.cpython-36.opt-2.pyc Content :3 \� � @ s� d dl Z e jdkred��d dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl Z dddddgZd Zej Z ejZej� Zeed�r�ejZnejejd fd d�Zdded �dd�ZG dd� d�ZG dd� dej�ZdS )� NZwin32z win32 only� socketpair�pipe�Popen�PIPE� PipeHandlei c C s | t jkrd}n| t jkr d}ntd��|t jkr:td��|dkrJtd��t j | ||�}z�|j|df� |jd� |j� d d� \}}t j | ||�}yP|jd � y|j ||f� W n t tfk r� Y nX |jd � |j� \}} W n |j � � Y nX W d |j � X ||fS )Nz 127.0.0.1z::1z?Only AF_INET and AF_INET6 socket address families are supportedz)Only SOCK_STREAM socket type is supportedr zOnly protocol zero is supported� � FT)�socket�AF_INETZAF_INET6� ValueError�SOCK_STREAMZbindZlistenZgetsocknameZsetblockingZconnect�BlockingIOError�InterruptedErrorZaccept�close) Zfamily�type�proto�hostZlsockZaddrZportZcsockZssock�_� r �-/usr/lib64/python3.6/asyncio/windows_utils.pyr % s8 FT)�duplex� overlapped�bufsizec C s" t jdtj� tt�f d�}| r>tj}tjtj B }|| }}ntj }tj }d| }}|tjO }|d rp|tjO }|d r�tj}nd}d } } yZtj ||tjd||tjtj�} tj||dtjtj|tj�} tj| dd�}|jd� | | fS | d k �rtj| � | d k �rtj| � � Y nX d S )Nz\\.\pipe\python-pipe-%d-%d-)�prefixr r T)r )�tempfileZmktemp�os�getpid�next� _mmap_counter�_winapiZPIPE_ACCESS_DUPLEXZGENERIC_READZ GENERIC_WRITEZPIPE_ACCESS_INBOUNDZFILE_FLAG_FIRST_PIPE_INSTANCEZFILE_FLAG_OVERLAPPEDZCreateNamedPipeZ PIPE_WAITZNMPWAIT_WAIT_FOREVERZNULLZ CreateFileZ OPEN_EXISTINGZConnectNamedPipeZGetOverlappedResult�CloseHandle)r r r ZaddressZopenmode�accessZobsizeZibsizeZflags_and_attribsZh1Zh2Zovr r r r S s@ c @ sX e Zd Zdd� Zdd� Zedd� �Zdd� Zej d �d d�Z dd � Zdd� Zdd� Z dS )r c C s || _ d S )N)�_handle)�self�handler r r �__init__� s zPipeHandle.__init__c C s* | j d k rd| j }nd}d| jj|f S )Nz handle=%r�closedz<%s %s>)r"