re-org + comments
This commit is contained in:
parent
2d506de55a
commit
2903c7f2a0
|
@ -81,6 +81,8 @@ class ServerBase:
|
|||
_received = b""
|
||||
connected = False
|
||||
|
||||
# override Protocol callbacks
|
||||
|
||||
def connectionMade(self):
|
||||
self.connected = True
|
||||
return Protocol.connectionMade(self)
|
||||
|
@ -89,15 +91,17 @@ class ServerBase:
|
|||
self.connected = False
|
||||
return Protocol.connectionLost(self, reason)
|
||||
|
||||
def dataReceived(self, data):
|
||||
self._received = self._received + data
|
||||
|
||||
# ITransitClient API
|
||||
|
||||
def send(self, data):
|
||||
self.transport.write(data)
|
||||
|
||||
def disconnect(self):
|
||||
self.transport.loseConnection()
|
||||
|
||||
def dataReceived(self, data):
|
||||
self._received = self._received + data
|
||||
|
||||
def reset_received_data(self):
|
||||
self._received = b""
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user