Unformatted text preview: receiving.start() r def sendstuff(): while 1: try: data = sys.stdin.readline() sock.sendall(data) if data == "exit\n": sock.close() break except (KeyboardInterrupt, SystemExit): raise except: continue def recvstuff(): while 1: try: buf = sock.recv(2048) if not len(buf): print 'Too long of a message!' break sys.stdout.write( buf ) except (KeyboardInterrupt, SystemExit): raise except: continue c main()...
View Full Document
This note was uploaded on 04/09/2008 for the course CSCI 4211 taught by Professor Sturtivant during the Spring '08 term at Minnesota.
- Spring '08