19 lines
488 B
Python
19 lines
488 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from typing import Any, Self, Optional, Sequence
|
|
from abc import ABC, abstractmethod
|
|
|
|
class WebSocketServersAbstractInterface(ABC):
|
|
|
|
@abstractmethod
|
|
def start(self:Self) -> None:pass
|
|
|
|
@abstractmethod
|
|
def close(self:Self) -> None:pass
|
|
|
|
@abstractmethod
|
|
def close_client(self:Self, id:int) -> None:pass
|
|
|
|
@abstractmethod
|
|
def send(self:Self, data:Any|None, ids:Optional[int|Sequence[int]] = None) -> None:pass |