#include "XmlRpc.h"
#include <fstream>
#include <iostream>
#include <stdlib.h>
Go to the source code of this file.
|
| int | main (int argc, char *argv[]) |
◆ main()
| int main |
( |
int | argc, |
|
|
char * | argv[] ) |
Definition at line 15 of file TestBase64Client.cpp.
15 {
16 if ( argc != 4 )
17 {
18 std::cerr << "Usage: TestBase64Client serverHost serverPort outputFile\n";
19 return -1;
20 }
21 int port = atoi( argv[2] );
22
23
25
27 if ( c.execute( "TestBase64", noArgs, result ) )
28 {
30 std::ofstream outfile( argv[3], std::ios::binary | std::ios::trunc );
31 if ( outfile.fail() ) std::cerr << "Error opening " << argv[3] << " for output.\n";
32 else
33 {
34 int n = int(
data.size() );
35 for (
int i = 0; i <
n; ++i ) outfile <<
data[i];
36 }
37 }
38 else std::cout << "Error calling 'TestBase64'\n\n";
39
40 return 0;
41}
A class to send XML RPC requests to a server and return the results.
RPC method arguments and results are represented by Values.
std::vector< char > BinaryData