Prev | Index | Next

Client implementation

from twisted.protocols import basic
from twisted.internet import defer

class PresenceClient(basic.LineReceiver):
    def connectionMade(self):
        self.queued = []
    def login(self, username):
        return self._sendCommand(
            'LOGIN %s' % username)
    def isonline(self, username):
        return self._sendCommand(
            'ISONLINE %s' % username)
    ...