mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 12:57:52 +00:00
Rename TCP protocol impl files
This commit is contained in:
parent
c5911a6f6b
commit
1cd7e28b50
@ -27,15 +27,15 @@ log = logging.getLogger(__name__)
|
||||
|
||||
class Connection:
|
||||
MODES = {
|
||||
0: Full,
|
||||
1: Abridged,
|
||||
2: Intermediate
|
||||
0: TCPFull,
|
||||
1: TCPAbridged,
|
||||
2: TCPIntermediate
|
||||
}
|
||||
|
||||
def __init__(self, address: tuple, proxy: dict, mode: int = 1):
|
||||
self.address = address
|
||||
self.proxy = proxy
|
||||
self.mode = self.MODES.get(mode, Abridged)
|
||||
self.mode = self.MODES.get(mode, TCPAbridged)
|
||||
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 .abridged import Abridged
|
||||
from .full import Full
|
||||
from .intermediate import Intermediate
|
||||
from .tcp_abridged import TCPAbridged
|
||||
from .tcp_full import TCPFull
|
||||
from .tcp_intermediate import TCPIntermediate
|
||||
|
@ -23,7 +23,7 @@ from .tcp import TCP
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Abridged(TCP):
|
||||
class TCPAbridged(TCP):
|
||||
def __init__(self, proxy: dict):
|
||||
super().__init__(proxy)
|
||||
|
@ -25,7 +25,7 @@ from .tcp import TCP
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Full(TCP):
|
||||
class TCPFull(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 .abridged import TCP
|
||||
from .tcp import TCP
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Intermediate(TCP):
|
||||
class TCPIntermediate(TCP):
|
||||
def __init__(self, proxy: dict):
|
||||
super().__init__(proxy)
|
||||
|
Loading…
x
Reference in New Issue
Block a user