The C++ framework for developing highly scalable, high performance servers on Windows platforms.

Example Servers - UDP Multicast Echo Server

This example shows you how to build a multicast UDP server. The basic structure of this server is similar to the Basic UDP Echo Server example and you should go and read about that first and have a good understanding of how everything fits together. This document will only cover the differences between the Basic UDP Echo Server example and this example.

This example is shipped with all licensed versions of The Server Framework and it requires the core server framework libraries (see here for licensing options). You can always download the latest version of this example from here; and although you will need the correct libraries to be able to build it you can look at the example code and see how it works and perhaps get ideas from it. A compiled, unicode release, build of this example is available on request if you require it for performance analysis of the framework.

The ServerMain.cpp file for this example is very similar to the previous example. The only differences is that we accept a multicast group address on the command line and we join that multicast group once the server has started.

             CSocketServer server(



             if (commandLine.HasMulticastAddress())
                const CFullAddress groupAddress(

                const CFullAddress interfaceAddress(

                server.JoinMulticastGroup(          // repeat for all multicast groups that you wish to join

             CSecurityDescriptorAllowAll sd;

The server itself is the same but it will receieve data from either the address and port that it's listening on or the multicast group that it belongs to.

Generated on Sun Sep 12 19:06:45 2021 for The Server Framework - v7.4 by doxygen 1.5.3