mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 20:59:29 +00:00
Rename protocol impl files
This commit is contained in:
parent
f69da98c99
commit
c531e6d146
@ -27,15 +27,15 @@ log = logging.getLogger(__name__)
|
||||
|
||||
class Connection:
|
||||
MODES = {
|
||||
0: TCPFull,
|
||||
1: TCPAbridged,
|
||||
2: TCPIntermediate
|
||||
0: Full,
|
||||
1: Abridged,
|
||||
2: Intermediate
|
||||
}
|
||||
|
||||
def __init__(self, address: tuple, proxy: dict, mode: int = 1):
|
||||
self.address = address
|
||||
self.proxy = proxy
|
||||
self.mode = self.MODES.get(mode, TCPAbridged)
|
||||
self.mode = self.MODES.get(mode, Abridged)
|
||||
self.lock = threading.Lock()
|
||||
self.connection = None
|
||||
|
||||
|
@ -16,6 +16,6 @@
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from .tcp_abridged import TCPAbridged
|
||||
from .tcp_full import TCPFull
|
||||
from .tcp_intermediate import TCPIntermediate
|
||||
from .abridged import Abridged
|
||||
from .full import Full
|
||||
from .intermediate import Intermediate
|
||||
|
@ -23,7 +23,7 @@ from .tcp import TCP
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class TCPAbridged(TCP):
|
||||
class Abridged(TCP):
|
||||
def __init__(self, proxy: dict):
|
||||
super().__init__(proxy)
|
||||
|
@ -25,7 +25,7 @@ from .tcp import TCP
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class TCPFull(TCP):
|
||||
class Full(TCP):
|
||||
def __init__(self, proxy: dict):
|
||||
super().__init__(proxy)
|
||||
self.seq_no = None
|
@ -19,12 +19,12 @@
|
||||
import logging
|
||||
from struct import pack, unpack
|
||||
|
||||
from .tcp_abridged import TCP
|
||||
from .abridged import TCP
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class TCPIntermediate(TCP):
|
||||
class Intermediate(TCP):
|
||||
def __init__(self, proxy: dict):
|
||||
super().__init__(proxy)
|
||||
|
Loading…
Reference in New Issue
Block a user