Updated test_app.py and sshserver.py

This commit is contained in:
Sheng
2018-04-27 09:49:48 +08:00
parent e88ecb2879
commit de0a903de8
2 changed files with 16 additions and 15 deletions
+2 -2
View File
@@ -77,11 +77,11 @@ class Server (paramiko.ServerInterface):
return True
def run_ssh_server(running=True):
def run_ssh_server(port=2200, running=True):
# now connect
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
sock.bind(('127.0.0.1', 2200))
sock.bind(('127.0.0.1', port))
sock.listen(100)
while running: