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

  • Home
  • SEARCH
  • 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 202331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:16:49+00:00 2026-05-11T17:16:49+00:00

I have a simple udp listener written in c++ using win32 when I compile

  • 0

I have a simple udp listener written in c++ using win32 when I compile and run the program under debug mode it works perfectly, and I’m clearly able to see the information from the packets that I’m receiving. When I run this same code as a release build it compiles fine and seems to run fine, but its not printing out any packet information like it did under the release build. I’ve tried to mirror the build configurations to match exactly but its still happening. Any suggestions would be greatly appreciated.

  • 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-05-11T17:16:49+00:00Added an answer on May 11, 2026 at 5:16 pm

    This is more likely an issue of not initializing variables to some initial value, so in debug they have some sort of value, but in release, most things are initialized zero (NULL). So, some condition/branch may be taking place, that you do not expect… Without your source code for example, it’s REALLY hard to spot issues.

    This has bit me more than once.. 🙂

    This is assuming you are not expecting to see anything using stuff like OutputDebugString() as Mehrdad suggested…

    Also, make sure your packets are UNDER 1024 bytes in size, or you will NOT get them. Took me a while to figure this one out back when XP came out, and I couldn’t figure out why my code worked on 2000, but not XP… Even though send (sendto) would return success, it never actually SENT the packet..

    Anyways, I’ve dealt with UDP a lot on Win32, so if you give me some example code I should be able to help more…

    But anyways, check that ALL your variables are initialized to some sort of default value on both the sender and the receiver, (which is just good practice), and then re-build it and try again. Also, check your packet size with a sizeof() before it sends, and if it’s greater than 1024 bytes, don’t bother… It’s also a good idea to check size of the received packet, and if it’s not exactly the size you expect, then drop the packet. This holds MORE true for broadcasts, but still applies.

    Let me know if any of this helped, I posted a LOT of UDP code on another question here a little while back, and that code works, you might want to refer to it.

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

Sidebar

Ask A Question

Stats

  • Questions 93k
  • Answers 93k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Databases have a query cache, which means that when you… May 11, 2026 at 6:33 pm
  • Editorial Team
    Editorial Team added an answer It's a good observation that a function that returns another… May 11, 2026 at 6:33 pm
  • Editorial Team
    Editorial Team added an answer A method group is the name for a set of… May 11, 2026 at 6:33 pm

Related Questions

I'm building a simple udp lan chat application in vb.net and I'm wondering how
The YAGNI principle states that you shouldn't focus on providing functionality before you needed
I need a simple way to monitor multiple text log files distributed over a
I've done quite a bit of programming on Windows but now I have to
I'm reading some MPEG Transport Stream protocol over UDP and it has some funky

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.