Exemplo n.º 1
0
def get_request():
    input = rpc_pb2.Request()
    service = UserServiceImpl()
    input.service_name = service.GetDescriptor().full_name
    input.method_name = 'UserLogin'
    data = user_pb2.UserLoginRequest()
    data.user_name = '*****@*****.**'
    data.user_pass = '******'
    input.request_proto = data.SerializeToString()
    request = input.SerializeToString();
    protocol = RPCProtocol()
    return protocol.build_request(request)
Exemplo n.º 2
0
def get_request():
    input = rpc_pb2.Request()
    service = UserServiceImpl()
    input.service_name = service.GetDescriptor().full_name
    input.method_name = 'UserLogin'
    data = user_pb2.UserLoginRequest()
    data.user_name = '*****@*****.**'
    data.user_pass = '******'
    input.request_proto = data.SerializeToString()
    request = input.SerializeToString()
    protocol = RPCProtocol()
    return protocol.build_request(request)
def get_request():
    input = rpc_pb2.Request()
    service = ServerStatus()
    input.service_name = service.GetDescriptor().full_name
    input.method_name = 'RPCStatus'
    data = status_pb2.TCPRequest()
    data.client_ip = 'Zach'
    data.user_name = 'Zach'
    data.user_pass = '******'
    input.request_proto = data.SerializeToString()
    request = input.SerializeToString();
    #print binascii.hexlify(request)
    protocol = RPCProtocol()
    return protocol.build_request(request)
def get_request():
    input = rpc_pb2.Request()
    service = ServerStatus()
    input.service_name = service.GetDescriptor().full_name
    input.method_name = 'RPCStatus'
    data = status_pb2.TCPRequest()
    data.client_ip = 'Zach'
    data.user_name = 'Zach'
    data.user_pass = '******'
    input.request_proto = data.SerializeToString()
    request = input.SerializeToString()
    #print binascii.hexlify(request)
    protocol = RPCProtocol()
    return protocol.build_request(request)