MCPcopy
hub / github.com/sshuttle/sshuttle / __init__

Method __init__

sshuttle/ssnet.py:113–124  ·  view source on GitHub ↗
(self, rsock, wsock, connect_to=None, peername=None)

Source from the content-addressed store, hash-verified

111class SockWrapper:
112
113 def __init__(self, rsock, wsock, connect_to=None, peername=None):
114 global _swcount
115 _swcount += 1
116 debug3('creating new SockWrapper (%d now exist)' % _swcount)
117 self.exc = None
118 self.rsock = rsock
119 self.wsock = wsock
120 self.shut_read = self.shut_write = False
121 self.buf = []
122 self.connect_to = connect_to
123 self.peername = peername or _try_peername(self.rsock)
124 self.try_connect()
125
126 def __del__(self):
127 global _swcount

Callers

nothing calls this directly

Calls 3

try_connectMethod · 0.95
debug3Function · 0.90
_try_peernameFunction · 0.85

Tested by

no test coverage detected