/[sshproxy]/sshproxy/SSHproxy/server/client.py
ViewVC logotype

Diff of /sshproxy/SSHproxy/server/client.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by dguerizec, Thu Jul 21 09:43:36 2005 UTC revision 1.2 by dguerizec, Tue Aug 2 13:26:29 2005 UTC
# Line 21  Line 21 
21  import sys, os, socket, traceback, select  import sys, os, socket, traceback, select
22  import paramiko, SSHproxy  import paramiko, SSHproxy
23    
24  class ProxyClient:  class ProxyClient(object):
25      def __init__(self, proxy_glue):      def __init__(self, proxy_glue):
26          self.proxy_glue = proxy_glue          self.proxy_glue = proxy_glue
27          print 'waiting for remote side to accept connection...',          print 'waiting for remote side to accept connection...',
# Line 52  class ProxyClient: Line 52  class ProxyClient:
52                  if chan in r:                  if chan in r:
53                      try:                      try:
54                          x = chan.recv(1024)                          x = chan.recv(1024)
55                            self.fdout.send(x)
56                          if len(x) == 0 or chan.closed or chan.eof_received:                          if len(x) == 0 or chan.closed or chan.eof_received:
57                              print "chan closed"                              print "chan closed"
58                              break                              break
                         self.fdout.send(x)  
59                      except socket.timeout:                      except socket.timeout:
60                          pass                          pass
61                  if self.fdin in r:                  if self.fdin in r:
62                      try:                      try:
63                          x = self.fdin.recv(1024)                          x = self.fdin.recv(1024)
64                            chan.send(x)
65                          if len(x) == 0 or self.fdin.closed or self.fdin.eof_received:                          if len(x) == 0 or self.fdin.closed or self.fdin.eof_received:
66                              print "fdin closed"                              print "fdin closed"
67                              break                              break
                         chan.send(x)  
68                      except socket.timeout:                      except socket.timeout:
69                          pass                          pass
70    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26