def METHOD_NAME(key):
	port = map[key]["port"]
	sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
	rtcp = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
	total_len = 0
	rtcp_len = 0
	print "Listening on %d for key %s" % (port, key)
	try:
		sock.bind(('', port))
		rtcp.bind(('', port+1))
	except:
		print "Binding on port %d failed for sock %s" % (port, key)
		sock.close()
		rtcp.close()
		return 
	sock.setblocking(0)
	sock.settimeout(2)
	rtcp.setblocking(0)
	last_cnt = 0
	cnt = 0
	diff = 0
	data = array.array('c', ' '*1500) 
	while (map.has_key(key)):
		try:
			(nb, ad) = sock.recvfrom_into(data, 1500)
			total_len = total_len + 1;
			if ord(data[0])==0x80 and ord(data[1])==0x21:
				cnt = ord(data[2])*256 + ord(data[3])
				last_cnt=last_cnt+1
				if last_cnt==65536:
					last_cnt = 0
					print "Resetting sequence number for port %d" % port
				if last_cnt != cnt:
					diff = diff + abs (last_cnt - cnt)
					print "Missing rtp packet connection %s expected cnt %x, actual cnt %x, diff %d" % (key, last_cnt, cnt, diff)
				if cnt % 0x1000 == 0:
					print "got data %x -> %x" % (last_cnt, cnt)
				last_cnt = cnt
				idx = 12
				while idx < nb:
					pid = (ord(data[idx+1])&0x1F )*256 + ord(data[idx+2])
					for k in range(4,184):
						fb = hex(ord(data[idx+k]))
						if(mymap.has_key(pid)):
							if mymap[pid].has_key(fb):
								mymap[pid][fb] = mymap[pid][fb] +1 
							else:
								mymap[pid][fb] = 1
						else :
							mymap[pid]={fb:1}
					idx = idx+188
			else:
				print "nothing %d %d" % (ord(data[0]), ord(data[1]))
		except:
			print traceback.format_exc()
			print "timeout on port %d" % port
			pass
		try:
			rtcp.recvfrom_into(data, 1500)