Add debug output.
This commit is contained in:
parent
a7857d257d
commit
bdde485c7c
2 changed files with 6 additions and 0 deletions
|
@ -17,9 +17,11 @@ class PeerServer(MessageServer):
|
|||
def _client_connected(self, client):
|
||||
assert isinstance(client, socket.socket)
|
||||
self._peers[client.getpeername()] = client
|
||||
logger.debug(self._peers.keys())
|
||||
|
||||
def _process_message(self, client, message):
|
||||
print(message)
|
||||
|
||||
def _client_closed(self, client):
|
||||
assert isinstance(client, socket.socket)
|
||||
logger.debug(self._peers.keys())
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
from p2pfs.core.utils import MessageServer
|
||||
import socket
|
||||
import logging
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class CentralServer(MessageServer):
|
||||
|
@ -9,6 +11,7 @@ class CentralServer(MessageServer):
|
|||
|
||||
def _client_connected(self, client):
|
||||
assert isinstance(client, socket.socket)
|
||||
logger.debug(self._peers.keys())
|
||||
|
||||
def _process_message(self, client, message):
|
||||
assert isinstance(client, socket.socket)
|
||||
|
@ -16,3 +19,4 @@ class CentralServer(MessageServer):
|
|||
|
||||
def _client_closed(self, client):
|
||||
pass
|
||||
logger.debug(self._peers.keys())
|
||||
|
|
Loading…
Reference in a new issue