Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/p2p/Notifier.py
blob: 017183c9b0505cf2c34beb921ae5e20092920a7b (plain)
1
2
3
4
5
6
7
8
9
10
11
import network

class Notifier:
	def __init__(self, group, name):
		service = group.get_service(name)
		address = service.get_address()
		port = service.get_port()
		self._client = network.GroupClient(address, port)
		
	def notify(self, msg):
		self._client.send_msg(msg)