info about connect method of boost::asio::ip::tcp::iostream
Hi All Right now I started using boost::asio::ip::tcp::iostream class. If I use the constructor of this class with 2 strings stating IP and PORT everything is fine and I can connect to my server. boost::asio::ip::tcp::iostream sockStream("1.2.3.4","5000"); Instead if I use the connect method using the port as int, connection doesn't happen. boost::asio::ip::tcp::iostream sockStream; sockStream.connect ("1.2.3.4", 5000 ); if( sockStream.fail() ){ std::cout << "I am not connected" << std::endl; } What am I doing wrong? It is something allowed to do or should I use other classes like resolver::query + resolver::iterator? Thanks CS
Auch! I don't know why but I tried already with the strings but I had
compilation errors...
( that's why I sent my email ).
Probably I had some typo error without realizing it.
Thank you very much and sorry for having bother you for this.
Regards
CS
On Wed, Feb 17, 2010 at 12:08 PM, Igor R
boost::asio::ip::tcp::iostream sockStream("1.2.3.4","5000"); <...> sockStream.connect ("1.2.3.4", 5000 ); <...> What am I doing wrong?
Compare the 2 above expressions - pay attention to the qutation marks: "5000". _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Conoscenza Silente
-
Igor R