1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-10-31 20:58:56 +00:00

add a . to comment. add a space to init. Add checks for reader and writer

This commit is contained in:
John Fleming 2024-01-31 21:40:50 -05:00
parent b8df0bb394
commit 288c566052

View File

@ -16,6 +16,12 @@ class SFTelnetProxyMuxer:
listen_ip = '0.0.0.0'
self.listen_ip = listen_ip
self.listen_port = listen_port
# use reader for remote server info
if reader:
self.reader = reader
# use writer for remote server info
if writer:
self.writer = writer
self.clients = set()
self.server = None
self.remote_reader = None
@ -25,7 +31,7 @@ class SFTelnetProxyMuxer:
self.IAC = b"\xff" # Interpret as Command
# Telnet NOP command. Will be used as a heartbeat to clients.
self.NOP = b"\xf1"
# Telnet Are You There
# Telnet Are You There.
self.AYT = b"\xf6"
if not remote_port:
raise ValueError("remote_port is a required value")