Solved

boost asio unable to run examples

Posted on 2008-10-13
5
691 Views
Last Modified: 2008-10-30
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
Comment
Question by:bachra04
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 53

Expert Comment

by:Infinity08
ID: 22709678
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
 
LVL 2

Author Comment

by:bachra04
ID: 22710693
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
 
LVL 53

Expert Comment

by:Infinity08
ID: 22710936
what if you use "localhost" instead of boost::asio::ip::host_name() ?
0
 
LVL 2

Author Comment

by:bachra04
ID: 22717347
I did but without success
0
 
LVL 53

Accepted Solution

by:
Infinity08 earned 500 total points
ID: 22718857
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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hyper-convergence systems have taken the IT world by storm and have quickly started to change our point of view of how the data center should and could be architected. In this article, I’ll explain the benefits of employing a hyper-converged system …
Learn about cloud computing and its benefits for small business owners.
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question