I wrote these codes, by it doesn't work.
- Code: Select all
StreamSocket ss;
SocketStream str(ss);
unsigned short port = 1970;
std::string path = "c:\index.html";
ss.connect(SocketAddress("localhost", port));
str << path;
str.flush();
Poco::FileOutputStream fos("c:\get_index.html");
StreamCopier::copyStream(str, fos);
str.flush();
fos.close();
str << "c:\test.pdf";
str.flush();
Poco::FileOutputStream fos2("c:\get_test.pdf");
StreamCopier::copyStream(str, fos2);
str.flush();
fos2.close();
ss.close();





