Page 443 - 3-2
P. 443

else :
                            print("fail2")
                    c.close()
                    print(data)


            print("Server Open")
            s.listen(5)               # Now wait for client connection.
            at = AsyncTask()
            at.TaskA()


            while True:
                c, addr = s.accept()    # Establish connection with client.
                print ('Got connection from', addr)


                if oneTime == 0:
                    while len(result) != 5:
                        if oneTime2 == 1:
                            print("wait")
                            oneTime2 = 0
                    oneTime2 = 1
                    c.send(dt.ctime()+"@"+result)
                    c.close()
                    at.TaskB()
                else:
                    print ('can not find illegal vehicle')
                    c.close()








































                                                         - 443 -
   438   439   440   441   442   443   444   445   446   447   448