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