< Table of Contents

Configure the Gateway to Use Multicast

This procedure demonstrates how to configure a service that is running on Kaazing Gateway to use a multicast address (for example, a broadcast service).

To configure a service to use multicast, you must specify the following elements in the Gateway configuration file (for example, GATEWAY_HOME/conf/gateway-config.xml):

The following example shows a service using a multicast address. In the example, data packets sent to udp://multicast-group:port with udp-interface eth0 will be broadcast to all clients connected to sse://localhost:8000/sse.

<!-- Broadcast multicast messages -->
<service>
  <accept>sse://localhost:8000/sse</accept>

  <type>broadcast</type>
  <properties>
    <accept>udp://224.0.0.1:port-number</accept>
      <accept-option>
        <udp-interface>eth0</udp-interface>
      </accept-option>
  </properties>

  <cross-site-constraint>
    <allow-origin>http://localhost:8000</allow-origin>
  </cross-site-constraint>

  <cross-site-constraint>
    <allow-origin>https://localhost:9000</allow-origin>
  </cross-site-constraint>
</service>

See Also