sugar-toolkit-gtk3/sugar/chat/BuddyChat.py
2006-06-22 18:07:54 -04:00

15 lines
370 B
Python

from sugar.chat.Chat import Chat
from sugar.p2p.Stream import Stream
class BuddyChat(Chat):
SERVICE_TYPE = "_olpc_buddy_chat._tcp"
def __init__(self, service):
Chat.__init__(self)
self._stream = Stream.new_from_service(service, False)
self._stream_writer = self._stream.new_writer(service)
def _recv_message_cb(self, address, msg):
self.recv_message(msg)