locked
Silverlight and TTL RRS feed

  • Question

  • Hello

    I’m facing multicast authorization problems when I try to run my silverlight client on a WAN  (LAN works perfect)

    The root cause is that the UdpAnySourceMulticastClient sends the authorization packet with TTL=1, so routers along the way drop this packet, so my authorization server never gets this packet.

    Is there a resolution for that?

    Thanks

    Guy.

    Saturday, July 25, 2015 8:19 PM

All replies

  • Hi Guy J,

      

    In my opinion, packages lost is caused by the network. Please try increase the value of TTL as below code. The value of TTL based on your application. "The TTL value may be set to a value from 0 to 255. When this property is not set, the default TTL value for a socket is 32.", more information about TTL property, please read
    https://msdn.microsoft.com/en-us/library/system.net.sockets.socket.ttl(v=vs.110).aspx

    static void ConfigureTcpSocket(Socket tcpSocket)
      {
       // Set the receive buffer size to 8k
       tcpSocket.ReceiveBufferSize = 8192;
    
       // Set the timeout for synchronous receive methods to  
       // 1 second (1000 milliseconds.)
       tcpSocket.ReceiveTimeout = 1000;
    
       // Set the send buffer size to 8k.
       tcpSocket.SendBufferSize = 8192;
    
       // Set the timeout for synchronous send methods 
       // to 1 second (1000 milliseconds.)   
       tcpSocket.SendTimeout = 1000;
    
       // Set the Time To Live (TTL) to 42 router hops.
       tcpSocket.Ttl = 42;
      }


    Best Regards,
    Weiwei



    Monday, July 27, 2015 9:44 AM
    Moderator
  • Would gladly change the ttl of the socket as long as you silverlight expose it...

    since the only way of doing multicast is using UdpAnySourceMulticastClient class, i'm quite blocked since the socket is internal to this class without a way of accessing it.

    Monday, July 27, 2015 10:46 PM
  • Please refer to this thread.

    http://stackoverflow.com/questions/1861005/silverlight-4-multicast-streaming

    It seems that there has no method to access the socket in UdpAnySourceMulticastClient class. Please try with the ReceiveBufferSize and SendBufferSize to control the buffer.



    Tuesday, July 28, 2015 9:43 AM