예제 #1
0
    def onConnected(connectionManager, proto):
        from aclSystem.ttypes import Session
        session = Session()
        session.sessionID = 100
        session.userID = 8
        session.appID = confs.SourceId
        session.AppGroupId = 2
        print('connect to tt success')
        from TTProto.ttypes import Registe
        registeMsg = Registe(session, confs.AppName, confs.Description)
        connectionManager.send(proto, 0, confs.SourceId, 0, registeMsg)

        reactor.callLater(30, sendHeartbeat, server, proto)
예제 #2
0
def onConnected(connectionManager, proto):
    from aclSystem.ttypes import Session
    session = Session()
    session.sessionID = 100
    session.userID = 8
    session.appID = sourceId
    session.AppGroupId = 2

    from TTProto.ttypes import Registe
    registeMsg = Registe(session, 'acl', 'a acl')
    connectionManager.send(proto, 0, sourceId, 0, registeMsg)
    # connectionManager.send(proto, 0, sourceId, 0, registeMsg,requestId)

    reactor.callLater(30, sendHeartbeat, pea, proto)
    reactor.callInThread(test, pea, proto)
예제 #3
0
    def onConnected(connectionManager, proto):
        from aclSystem.ttypes import Session
        session = Session()
        session.sessionID = 100
        session.userID = 8
        session.appID = confs.SourceId
        session.AppGroupId = 2
        print('connect to tt success')
        from TTProto.ttypes import Registe
        registeMsg = Registe(session, confs.AppName, confs.Description)
        connectionManager.send(proto, 0, confs.SourceId, 0, registeMsg)

        reactor.callLater(30, sendHeartbeat, server, proto)
예제 #4
0
파일: pea.py 프로젝트: weijiayun/Json
    def onConnected(connectionManager, proto):
        #session = login(confs['LOGINHOST'], confs['LOGINPORT'], confs['USERNAME'], confs['PASSWORD'], confs['APPID'], confs['APPGROUPID'])
	from aclSystem.ttypes import Session
        session = Session()
        session.sessionID = 100
        session.userID = 8
        session.appID = sourceId
        session.AppGroupId = 2

        from TTProto.ttypes import Registe
        registeMsg = Registe(session, 'pea', 'a mock client')
        connectionManager.send(proto, 0, sourceId, 0, registeMsg)

        reactor.callLater(30, sendHeartbeat, pea, proto)
예제 #5
0
def onConnected(connectionManager, proto):
    from aclSystem.ttypes import Session
    session = Session()
    session.sessionID = 100
    session.userID = 8
    session.appID = sourceId
    session.AppGroupId = 2

    from TTProto.ttypes import Registe
    registeMsg = Registe(session, 'acl', 'a acl')
    connectionManager.send(proto, 0, sourceId, 0, registeMsg)
    # connectionManager.send(proto, 0, sourceId, 0, registeMsg,requestId)

    reactor.callLater(30, sendHeartbeat, pea, proto)
    reactor.callInThread(test, pea, proto)