This post relates to the following tutrial: http://appinf.com/poco/wiki/tiki-index.php?page=tutorialtcpsockets
I am trying to copy an input stream from a StreamSocket into std::cout.
ReceiveBytes works fine but StreamCopier::copyStream fails.
I am sending a string from a SocketServer and need to receive the string at the client side using a socket.
On the client side I first open a socket and connect to the socket server succesfully:
SocketAddress sa(svsHost, svsPort);.
Calling the following code succeeds:
int numBytesReceived = ss1.receiveBytes(buffer, sizeof(buffer));
But the next following code fails:
"int numBytesCopied = StreamCopier::copyStream(strIn, std::cout);"
The value of the returned numBytesCopied is 0