예제 #1
0
파일: views.py 프로젝트: kangyijie5473/lepv
def ping(server):

    client = LepDClient(server=server)

    data = {}
    data['connected'] = client.ping()

    return jsonify(data)
예제 #2
0
def ping_lepd_server(request):

    server = request['server']
    print('received ping: ' + server)

    client = LepDClient(server=server)

    data = {'connected': client.ping()}

    emit('pong', data)
예제 #3
0
파일: run.py 프로젝트: zhanglianpin/lepv
def ping_lepd_server(request):

    server = request['server']
    print('received ping: ' + server)

    client = LepDClient(server=server)

    ping_result = client.ping()

    if ping_result:
        emit('lepd.ping.succeeded', {})
    else:
        emit('lepd.ping.failed', {})