• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 768
  • Last Modified:

boost asio unable to run examples

Hi All,

I tried the following examples:
http://www.boost.org/doc/libs/1_36_0/doc/html/boost_asio/tutorial.html
by creating a simple synchronous tcpip server and a simple tcpip client and running them on Sun Solaris 5.10,
So I run the server but each time I run the client and try to connect I got "connection refused message"
Please provide any help.

Thanks,

B.T
0
bachra04
Asked:
bachra04
  • 3
  • 2
1 Solution
 
Infinity08Commented:
Can you show the exact code you used ? (there are multiple code samples on that site - which did you use, and how did you modify it ?)

Are you running the client and the server on the same machine ? Or on different machines ?

Do you have any firewall installed ?
0
 
bachra04Author Commented:
Actually this part of code is not working

tcp::resolver::query query(boost::asio::ip::host_name(), "daytime");  
// resolve the query
endpoint_iterator = resolver.resolve(query);

Once I removed that everything works fine, so it has something to do with name resolution.
It has sthg to do with name/ address resolution.
By the way I'm running both client and server on the same machine.
0
 
Infinity08Commented:
what if you use "localhost" instead of boost::asio::ip::host_name() ?
0
 
bachra04Author Commented:
I did but without success
0
 
Infinity08Commented:
As I asked earlier, can you show the exact code you are using, as well as the output you get from both server and client ?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now