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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:43:41+00:00 2026-05-15T09:43:41+00:00

I am learning how to use the boost asio libraries and I am using

  • 0

I am learning how to use the boost asio libraries and I am using the UDP examples on visual studio 2008. I have compiled and run the server application(name udp_server.exe). I have tried to run the client application but is does connect to the server. How do I specify the host and service name to the application for it to connect. I have specified the machine name but I get an error “No connection could be made because the target machine actively refused it”. Are there some prerequisite setup I need to perform on my Windows 7 machine to get the examples to work?

  • 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-15T09:43:41+00:00Added an answer on May 15, 2026 at 9:43 am

    Assuming that you are referring to the “Daytime.4 – A synchronous UDP daytime client” example, the server’s host name is passed as argv[1] (the first command-line parameter) to the udp::resolver::query ctor. As you can see from the docs, the port is passed as the 3rd parameter to the ctor. This parameter can be a string representation of the port number or a “service name”. Quoting the docs about this:

    On POSIX systems, service names are
    typically defined in the file
    /etc/services. On Windows, service
    names may be found in the file
    c:\windows\system32\drivers\etc\services.

    If all this seems ok and connection still fails, check the firewall settings on the server to make sure that it allows connections on the chosen port.

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

Sidebar

Related Questions

Learning boost, and compiled their daytime server client example . Since I cant use
I am learning to use Processing , and have modified one of the examples
I am learning to use Boost ASIO. Here is some code copied from the
I am learning to use listBox in WPF with dataTemplate using the examples from
I'm learning how to use Boost:asio library with Serial Port. I wrote some code
I am just learning to use Services, and am sort of stuck. I have
I am learning to use mysql for rails apps, and I finally have been
I'm learning the use of boost smart pointers but I'm a bit confused about
I am learning to use DelgateCommand from Prism.... In my UI, I have my
I recently wanted to use boost::algorithm::join but I couldn't find any usage examples and

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.