print 'Listening on port {} for Gast'.format(GASTPORT)
conn, addr = s.accept()
print 'Connected by Gast at {}'.format(addr)
+ print 'Initiating connection to EchoServer at port {}...'.format(serverPort)
sender = Sender(serverIP="127.0.0.1", networkInterface="lo", isLocal=True, serverPort=serverPort, waitTime=1, isVerbose=0)
- seqnr = None
+ seqnr = 0
response = ''
data = ''
while True:
seqnr += 1
print 'A: {}'.format(seqnr)
response = sender.sendInput('A', seqnr, sender.lastSeqReceived + 1)
+ elif data == 'DATA':
+ seqnr += 1
+ print 'DAT: {} sending: a'.format(seqnr)
+ response = sender.sendInput('PA', seqnr, sender.lastSeqReceived + 1, 'a')
elif data == 'RST':
seqnr += 1
print 'RP: {}'.format(seqnr)