Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8730683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:04:28+00:00 2026-06-13T09:04:28+00:00

I have a UDP server which binds to a well-known port, adds itself to

  • 0

I have a UDP server which binds to a well-known port, adds itself to a multicast group and listens for requests for clients. (The server is on Windows, and uses WSARecvFrom to issue an overlapped receive for client datagrams.) Clients send messages to the server at its well-known port and multicast IP address.

When testing the ‘server’ on a laptop, I have noticed that if the laptop enters a ‘sleep’ state the server’s receiving socket becomes ‘unbound’ from the multicast address (so that client sends to the multicast address are no-longer received). However, the socket is still receiving in that a send to its port at 127.0.0.1 is still received – and Windows does not indicate any error. (The server socket is bound to INADDR_ANY.)

The ‘server’ is part of a peer-to-peer application, used for auto-discovery – so this situation is not as unusual as might be expected.

Can you suggest a way to determine whether the server is still actively listening on the multicast address without sending to the multicast address (which would result in unnecessary traffic to all ‘servers’ on the network)? One possible solution would be to send to the IP address of the adapter used for multicast, but I’m not sure how to determine this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T09:04:29+00:00Added an answer on June 13, 2026 at 9:04 am

    Your network stack will periodically send out IGMP messages. Switches on your network may use IGMP snooping to determine which (if any) multicast messages your computer requires. (This is all an attempt to avoid placing excessive load on hosts due to traffic they haven’t requested.)

    When your laptop sleeps, it’ll stop sending out the periodic messages confirming its interest in certain multicast traffic. Your switch will notice this and stop sending the traffic to your laptop.

    I think you’ll need to spot when your laptop resumes from hibernation and re-add membership to multicast groups. I’ve done this (plus coping with network adapters being enabled/disabled) in the past by calling WSAIoctl with control code SIO_ADDRESS_LIST_CHANGE. Whenever a laptop sleeps, all adapters are reported as disabled; when it resumes, adapters are reported to be enabled again. (Note that this can be slightly fiddly as the adapters may be reported as available a few seconds before they’re actually capable of sending UDP datagrams so you may have to retry adding membership a few times, with small delays between each retry. Or you could just wait 30 seconds after being notified of adapter changes if you prefer.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UDP Server which has to serve clients on both IPV4 and
I have a java program which sends a udp packet to a server when
I have client code which gets a response from the server using UDP and
I have an OpenSIPS server which listens on multiple IPs. If I route the
I have a simple UDP client server written in C++ on Ubuntu 9.10 where
I have been investigating about creating a UDP server, at first i though i
I have a written a very simple UDP Server using Netty - it quite
I have a problem with a Sender and a Server UDP. The SenderUDP sends
I have a client and a server communicating with datagrams (UDP) in C. The
I have a udp client that is listening for multicast messages. When it gets

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.