README 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. This directory contains working examples of uses of XML-RPC-c. There
  2. are XML-RPC servers and XML-RPC clients that use the Xmlrpc-c libraries.
  3. The make file is a combination of an example of how to build programs
  4. that use Xmlrpc-c libraries and something that actually does build the
  5. programs in this directory. As such, it isn't perfect for either of
  6. those purposes. To build the examples, you must first build the
  7. libraries (make dependencies will not take care of that for you). Then
  8. you can issue a simple 'make' in this directory.
  9. The simplest server program is 'xmlrpc_sample_add_server'. This
  10. implements a single XML-RPC method called 'sample.add'. All it does is
  11. add two numbers and return the sum. You can run such a server like
  12. this:
  13. $ ./xmlrpc_sample_add_server 8080
  14. The server this runs is based on the Abyss HTTP server. file. The
  15. argument tell it to listen on TCP Port 8080 for RPCs. It puts log
  16. information in /tmp, so be sure to look there.
  17. A client program that goes along with this server is
  18. 'xmlrpc_sample_add_client'. All this client does is make an XML-RPC
  19. request to Port 8080 of 'localhost' to add the numbers 5 and 7 and
  20. print the result on Standard Output.
  21. You can run such a client like this:
  22. $ ./xmlrpc_sample_add_client