Commit dcb86aae authored by Sam Rushing's avatar Sam Rushing

removed dead code & some debug cruft

parent 03801ed4
...@@ -41,24 +41,6 @@ user_key_ob = ks.parse_public_key (user_key_pub) ...@@ -41,24 +41,6 @@ user_key_ob = ks.parse_public_key (user_key_pub)
def usage(): def usage():
print 'test_coro_server [-p port]' print 'test_coro_server [-p port]'
def input_thread(channel):
stdin = coro.fd_sock(0)
while 1:
data = stdin.recv(100)
channel.send(data)
def transport_thread(channel):
stdout = coro.fd_sock (1)
while not channel.eof and not channel.closed:
try:
data = channel.read(1024)
if data:
stdout.send (data)
#os.write(1, data)
except EOFError:
break
coro.set_exit()
def serve (port): def serve (port):
s = coro.tcp_sock() s = coro.tcp_sock()
s.bind (('', port)) s.bind (('', port))
...@@ -81,7 +63,6 @@ class echo_server (coro.ssh.connection.interactive_session.Interactive_Session_S ...@@ -81,7 +63,6 @@ class echo_server (coro.ssh.connection.interactive_session.Interactive_Session_S
self.close() self.close()
def go (conn, addr): def go (conn, addr):
global service, transport
debug = coro.ssh.util.debug.Debug() debug = coro.ssh.util.debug.Debug()
debug.level = coro.ssh.util.debug.DEBUG_3 debug.level = coro.ssh.util.debug.DEBUG_3
transport = coro.ssh.l4_transport.coro_socket_transport.coro_socket_transport(sock=conn) transport = coro.ssh.l4_transport.coro_socket_transport.coro_socket_transport(sock=conn)
...@@ -90,8 +71,6 @@ def go (conn, addr): ...@@ -90,8 +71,6 @@ def go (conn, addr):
authenticator = coro.ssh.auth.userauth.Authenticator (server, [pubkey_auth]) authenticator = coro.ssh.auth.userauth.Authenticator (server, [pubkey_auth])
server.connect (transport, authenticator) server.connect (transport, authenticator)
service = coro.ssh.connection.connect.Connection_Service (server, echo_server) service = coro.ssh.connection.connect.Connection_Service (server, echo_server)
W ('sleeping...\n')
coro.sleep_relative (1000)
def main(): def main():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment