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
LVL 2
bachra04Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Infinity08Connect With a Mentor Commented:
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
 
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
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.

All Courses

From novice to tech pro — start learning today.