Some examples of code in C and Python for socket communication
To compile the C examples type
$ make
on the command line.
Then run first the server
on a terminal on some port number (5000 in the example below)
$ ./server 5000
And run the client
with domain and port on another terminal:
$ ./client localhost 5000
To run the python server/client socket examples, run the server and client on different terminals
$ python server.py
and
$ python client.py
To run the XML RPC run server and client on different terminals:
$ python xmlserver.py
and
$ python xmlclient.py
- Sockets tutorial (C): http://www.cs.rpi.edu/~moorthy/Courses/os98/Pgms/socket.html
- Sockets in Python: https://docs.python.org/3.6/library/socket.html
- XML RPC: https://docs.python.org/3.6/library/xmlrpc.client.html