Rename protocol impl files

This commit is contained in:
Dan 2018-05-18 13:47:47 +02:00
parent f69da98c99
commit c531e6d146
5 changed files with 11 additions and 11 deletions

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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)