⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.30
Server IP:
45.79.8.107
Server:
Linux localhost 5.15.0-140-generic #150-Ubuntu SMP Sat Apr 12 06:00:09 UTC 2025 x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.2-1ubuntu2.21
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3.10
/
asyncio
/
__pycache__
/
View File Name :
streams.cpython-310.pyc
o }5hd @ s& d Z ddlZddlZddlZddlZddlZeedre d7 Z ddlmZ ddlm Z ddlm Z dd lmZ dd lmZ ddl mZ ddlmZ d ZdedddZdedddZeedrpd edddZd edddZG dd dejZG dd deejZG dd dZG dd dZdS )!)StreamReaderStreamWriterStreamReaderProtocolopen_connectionstart_server NAF_UNIX)open_unix_connectionstart_unix_server ) coroutines)events) exceptions)format_helpers) protocols)logger)sleepi )limitc s` t }t||d}t||d |j fdd| |fi |I dH \}}t| ||}||fS )a A wrapper for create_connection() returning a (reader, writer) pair. The reader returned is a StreamReader instance; the writer is a StreamWriter instance. The arguments are all the usual arguments to create_connection() except protocol_factory; most common are positional host and port, with various optional keyword arguments following. Additional optional keyword arguments are loop (to set the event loop instance to use) and limit (to set the buffer limit passed to the StreamReader). (If you want to customize the StreamReader and/or StreamReaderProtocol classes, just copy the code -- there's really nothing special here except some convenience.) r loopr c S N r protocolr &/usr/lib/python3.10/asyncio/streams.py
1 z!open_connection.
.
N)r get_running_loopr r create_connectionr ) hostportr kwdsr reader transport_writerr r r r s r c s6 t fdd}j|||fi |I dH S )a Start a socket server, call back for each client connected. The first parameter, `client_connected_cb`, takes two parameters: client_reader, client_writer. client_reader is a StreamReader object, while client_writer is a StreamWriter object. This parameter can either be a plain callback function or a coroutine; if it is a coroutine, it will be automatically converted into a Task. The rest of the arguments are all the usual arguments to loop.create_server() except protocol_factory; most common are positional host and port, with various optional keyword arguments following. The return value is the same as loop.create_server(). Additional optional keyword arguments are loop (to set the event loop instance to use) and limit (to set the buffer limit passed to the StreamReader). The return value is the same as loop.create_server(), i.e. a Server object which can be used to stop the service. c t d} t| d}|S Nr r r r r# r client_connected_cbr r r r factoryO zstart_server.
.factoryN)r r create_server)r, r r! r r" r- r r+ r r 6 s r c s^ t }t||d}t||d |j fdd| fi |I dH \}}t| ||}||fS )z@Similar to `open_connection` but works with UNIX Domain Sockets.r r c r r r r r r r r c r z&open_unix_connection.
.
N)r r r r create_unix_connectionr )pathr r" r r# r$ r% r&