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 34117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:01:41+00:00 2026-05-10T14:01:41+00:00

I have a network C++ program in Windows that I’d like to test for

  • 0

I have a network C++ program in Windows that I’d like to test for network disconnects at various times. What are my options?

Currently I am:

  1. Actually disconnecting the network wire from the back of my computer
  2. using ipconfig /release
  3. Using the cports program to close out the socket completely

None of these methods though are ideal for me, and I’d like to emulate network problems more easily.

I would like for sometimes connects to fail, sometimes socket reads to fail, and sometimes socket writes to fail. It would be great if there was some utility I could use to emulate these types of problems.

It would also be nice to be able to build some automated unit tests while this emulated bad network is up.

  • 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. 2026-05-10T14:01:41+00:00Added an answer on May 10, 2026 at 2:01 pm

    You might want to abstract the network layer, and then you can have unit tests that inject interesting failure events at appropriate points.

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

Sidebar

Related Questions

I have written a program that will etablish a network connection with a remote
On my home network I have an installation of Windows Server 2008 and for
How do I check that I have an open network connection and can contact
Maybe you can help me... I am writing a program in Windows Mobile that
I have a windows service written in C# that acts as a proxy for
I have a Windows Forms application that runs locally on the user's desktop. The
I'm developing a program using Windows 7. There are WCF services (soap, rest) that
You have multiple network adapters. Bind a UDP socket to an local port, without
I have multiple Network Interface Cards on my computer, each with its own IP
Our network admins have disabled IMAP and POP for our exchange server, but do

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.