locked
setsockopt with IP_MULTICAST_LOOP not work in win 7 RRS feed

  • Question

  • I write this code to configure socket to not return back messages sand in broadcast mode. In Win XP it work well , that is, the socket not received back it's own messages that it send. In win 7 the it seems to be no effect, the socket continue to get messages that it send , Why?


    int  val=0;
    int iResult=setsockopt(hsoc,IPPROTO_IP, IP_MULTICAST_LOOP,(const char *)&val,sizeof(val));

    • Moved by Jesse Jiang Thursday, January 27, 2011 7:12 AM (From:Visual C++ General)
    Tuesday, January 25, 2011 6:27 PM

All replies

  • Did you try running the program with elevated privileges? (Right click and Run as administrator)
    «_Superman_»
    Microsoft MVP (Visual C++)
    Tuesday, January 25, 2011 7:03 PM
  • Now i try to run as administrator so but it not help,  still  call  setsockopt with IP_MULTICAST_LOOP has no effect.

    What is "elevated privileges" ? How do i set this. all I did is right key on the program icon and select ""Run as adminstrator", ( and no change in the behavier of the program )  is this what you mean ?

    Avraham

    Tuesday, January 25, 2011 7:43 PM
  •  

    Hi avraham11

     

    I think your issue is about the development of Windows Networking. So I will move this one to Winsock Kernel (WSK) Forum. I think that forum will know more information about this topic than us.

     

    Thanks for your understanding,

     

    Best regards,

    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, January 27, 2011 7:12 AM
  • What happened with this issue.   I tried to follow your link to Winsock Kernel(WSK) but I cannot see the issue there. Can you please locate the issue and add a link to it.
    --jm
    Tuesday, January 17, 2012 5:53 AM