Ready auth_client!!

This commit is contained in:
2023-07-08 02:20:49 +03:00
parent 3b6496146a
commit 987e445a8f
3 changed files with 52 additions and 21 deletions

View File

@@ -4,8 +4,10 @@
# Version 0.1.2
# Licence: FPA
# (c) kuitoi.su 2023
import asyncio
from asyncio import StreamWriter, StreamReader
import socket
from typing import Tuple
from core import utils, Core
from core.core import Client
@@ -17,11 +19,12 @@ class TCPServer:
self.Core = core
self.host = host
self.port = port
self.loop = asyncio.get_event_loop()
async def recv(self, client: Client) -> bytes: ...
async def auth_client(self, sock: socket.socket) -> None: ...
async def handle_download(self, sock: socket.socket) -> None: ...
async def handle_code(self, code: str, sock: socket.socket) -> None: ...
async def handle_client(self, sock: socket.socket) -> None: ...
async def auth_client(self, reader: StreamReader, writer: StreamWriter) -> Tuple[bool, Client]: ...
async def handle_download(self, writer: StreamWriter) -> bool: ...
async def handle_code(self, code: str, reader: StreamReader, writer: StreamWriter) -> bool: ...
async def handle_client(self, reader: StreamReader, writer: StreamWriter) -> None: ...
async def start(self) -> None: ...
async def stop(self) -> None: ...