예제 #1
0
def main():

    session = Remote.new_session('[email protected]/rpc', '*****')

    thermostat = session.new_handler(ANY_ALL, Thermostat, 18)

    thermostat.wait_for_release()

    session.close()
예제 #2
0
def main():

    session = Remote.new_session('[email protected]/rpc', '*****')

    thermostat = session.new_handler(ANY_ALL, Thermostat, 18)

    thermostat.wait_for_release()

    session.close()
예제 #3
0
def main():

    session = Remote.new_session('[email protected]/rpc', '*****')

    thermostat = session.new_proxy('[email protected]/rpc', Thermostat)

    print("Current temperature is %s" % thermostat.get_temperature())

    thermostat.set_temperature(20)

    time.sleep(10)

    session.close()
예제 #4
0
def main():

    session = Remote.new_session('[email protected]/rpc', '*****')

    thermostat = session.new_proxy('[email protected]/rpc', Thermostat)

    print("Current temperature is %s" % thermostat.get_temperature())

    thermostat.set_temperature(20)

    time.sleep(10)

    session.close()
예제 #5
0
def main():

    session = Remote.new_session('[email protected]/rpc', '*****')

    session.new_handler(ANY_ALL, Boomerang)

    boomerang = session.new_proxy('[email protected]/rpc', Boomerang)

    callback = Future()

    boomerang.async(callback).throw()

    time.sleep(10)

    session.close()
예제 #6
0
파일: rpc_async.py 프로젝트: wuzzap/slixmpp
def main():

    session = Remote.new_session('[email protected]/rpc', '*****')

    session.new_handler(ANY_ALL, Boomerang)

    boomerang = session.new_proxy('[email protected]/rpc', Boomerang)

    callback = Future()

    boomerang. async (callback).throw()

    time.sleep(10)

    session.close()