Browse Source

sync_test.py

AllGroupDevicesShowHandshake
Volker Birk 6 years ago
parent
commit
1b8cabd299
2 changed files with 22 additions and 0 deletions
  1. +1
    -0
      .hgignore
  2. +21
    -0
      test/sync_test.py

+ 1
- 0
.hgignore View File

@ -4,3 +4,4 @@ syntax: glob
*.o
*.so
ws
tags

+ 21
- 0
test/sync_test.py View File

@ -0,0 +1,21 @@
from pEp import *
_msg = []
_me = None
_partner = None
class Handler(SyncMixIn):
def messageToSend(self, msg):
global _msg
print("-" * 80)
print(str(msg).replace("\r", ""))
_msg.append(msg)
def showHandshake(self, me, partner):
print("handshake needed between " + repr(me) + " and " + repr(partner))
global _me, _partner
_me, _partner = (me, partner)
handler = Handler()

Loading…
Cancel
Save