diff options
Diffstat (limited to 'examples/network/clientserver/clientserver.doc')
-rw-r--r-- | examples/network/clientserver/clientserver.doc | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/examples/network/clientserver/clientserver.doc b/examples/network/clientserver/clientserver.doc new file mode 100644 index 000000000..67b72a5da --- /dev/null +++ b/examples/network/clientserver/clientserver.doc @@ -0,0 +1,35 @@ +/* +*/ + +/*! \page clientserver-example.html + + \ingroup network-examples + + \title A small client-server example + + This example shows how two programs can communicate using sockets. + + Two simple example programs are provided, a client program and a + server program. Both use the QSocket class, and the server also uses + QServerSocket class. + + The server listens on port number 4242 and accepts incoming connections. + It sends back every line it receives from the client, prepended with + the line number. + + The client tries to connect to the server on the host specified on the + command line or to localhost if no command line arguments are + specified. You can send single lines to the server. + + <hr> + + Implementation server (server.cpp): + + \include network/clientserver/server/server.cpp + + <hr> + + Implementation client (client.cpp): + + \include network/clientserver/client/client.cpp +*/ |