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:
parent
b8df0bb394
commit
288c566052
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user