Solved

boost asio unable to run examples

Posted on 2008-10-13
5
686 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
  • 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

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
smtp c source code 7 85
How to access ANSI/IEEE Std 754 or equivalent information ? 3 72
Why is compiler in oracle server ? 9 75
Adding items to a C# list incrementally 5 29
More or less everybody in the IT market understands the basics of Networking, however when we start talking about Storage Networks, things get a bit dizzier, and this is where I would like to help.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

809 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