Exemplo n.º 1
0
def message_recieve():
	global alive
	global master
	while True:
		if master == 'False':
			alive = 'False'
			alive = broadcast.recieve()
			print alive
		time.sleep(1)
Exemplo n.º 2
0
import broadcast
import struct
import sys

while True:
	
	print >>sys.stderr, '\nwaiting to receive message'
	data = broadcast.recieve();

	print >>sys.stderr, 'received %s' % (data)
Exemplo n.º 3
0
def message_recieve(master, alive):
	while True:
		if master.value == 0:
			alive.value = 0
			alive.value = int(broadcast.recieve())
		time.sleep(1)