MCPcopy Create free account
hub / github.com/apenwarr/sshuttle / __init__

Method __init__

ssnet.py:90–101  ·  view source on GitHub ↗
(self, rsock, wsock, connect_to=None, peername=None)

Source from the content-addressed store, hash-verified

88_swcount = 0
89class SockWrapper:
90 def __init__(self, rsock, wsock, connect_to=None, peername=None):
91 global _swcount
92 _swcount += 1
93 debug3('creating new SockWrapper (%d now exist)\n' % _swcount)
94 self.exc = None
95 self.rsock = rsock
96 self.wsock = wsock
97 self.shut_read = self.shut_write = False
98 self.buf = []
99 self.connect_to = connect_to
100 self.peername = peername or _try_peername(self.rsock)
101 self.try_connect()
102
103 def __del__(self):
104 global _swcount

Callers

nothing calls this directly

Calls 3

try_connectMethod · 0.95
debug3Function · 0.85
_try_peernameFunction · 0.85

Tested by

no test coverage detected