Click here to Skip to main content
15,894,825 members
Articles / Programming Languages / C++

Reliable Multicast with PGM and WCF

Rate me:
Please Sign up or sign in to vote.
4.81/5 (17 votes)
1 Mar 2010CPOL6 min read 81K   1.6K   35  
PGM is a transport layer protocol which interfaces directly with network layer using raw sockets. In this article, we will see how to implement a reliable multicast with PGM and WCF.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.serviceModel>
    <extensions>
      <bindingElementExtensions>
        <add name="pgmTransport"
             type="PgmTransport.Configuration.PgmTransportElement, PgmTransport" />
      </bindingElementExtensions>
    </extensions>
    <behaviors>
      <serviceBehaviors>
        <behavior name="TestApp.Service1Behavior">
          <serviceMetadata httpGetEnabled="false" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <customBinding>
        <binding name="WorkService">
          <binaryMessageEncoding />
          <pgmTransport maxMessageSize="65536"
                        dataMode = "Message">
            <diagnostics enabled="true" interval="00:00:05" directory="C:\PgmLogs" />
          </pgmTransport>
        </binding>
      </customBinding>
    </bindings>
    <services>
      <service behaviorConfiguration="TestApp.Service1Behavior"
               name="SimpleReceiver.WorkService">
        <endpoint address="net.pgm://227.0.1.2:5000/WorkService"
                  binding="customBinding"
                  contract="SimpleReceiver.IWorkService"
                  bindingConfiguration="WorkService">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <!--<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8731/Design_Time_Addresses/TestApp/Service1/" />
          </baseAddresses>
        </host>-->
      </service>
    </services>
  </system.serviceModel>
  <!--<system.diagnostics>
    <trace autoflush="true" />
    <sources>
      <source name="System.ServiceModel"
              switchValue="Information, ActivityTracing"
              propagateActivity="true">
        <listeners>
          <add name="sdt"
              type="System.Diagnostics.XmlWriterTraceListener"
              initializeData= "C:\Temp\SdrConfigExample.svcLog" />
        </listeners>
      </source>
    </sources>
  </system.diagnostics>-->
</configuration>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Israel Israel
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions