poco-libraries

Upload a file using POCO - SSL Connection Unexpectedly Closed Exception

南楼画角 提交于 2019-12-02 09:01:19
Upload a file to a HTTPS url using POCO HTTP POST request always returns "SSL Connection Unexpectedly Closed" Exception Below is the code i am using for Multipart upload of a file.. try { Poco::URI uri(uploadLink); const Poco::Net::Context::Ptr context = new Poco::Net::Context(Poco::Net::Context::CLIENT_USE, "", "", "", Poco::Net::Context::VERIFY_NONE, 9, false, "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH"); Poco::Net::HTTPSClientSession session(uri.getHost(), uri.getPort(), context); session.setKeepAlive(true); // prepare path std::string path(uri.getPathAndQuery()); if (path.empty()) { path = "/"; }

How to transfer a C++ object to a web service using POCO library

≯℡__Kan透↙ 提交于 2019-12-01 08:32:01
I have an image processing application that uses Qt and openCV. for each frame, I should send the captured cv::Mat image object to the server to process it and get the results. I should use the REST architecture for its low playload. What is the tool that I should use to send cv::Mat to the server. I am using POCO for portability. I seek for the lightest solution to do that, I need a minimum speed of 10 frames processed by the server in a second. I mean, is there a method to pass the C++ Object to the server without an explicit serialization? Will Glück EDIT With the POCO library, you can take

Clion, cMake and POCO

北慕城南 提交于 2019-11-30 16:10:47
new guy to c++ and cmake here. I decided to test out cLion and cMake. Im trying to write a simple email client for the command line. Other sources told me that the best way to implement a POP3 and SMTP functions would be to use POCO. Unfortunately, cMake is giving me trouble. the version that came with CLion is 3.2 but the version that my machine is running is 2.8. ~$ cmake --version cmake version 2.8.12.2 First problem. I thought that I could bypass this by just installing POCO and doing the same thing that i used for openssl which i also had to download. cMakeList.txt: cmake_minimum_required

Poco::Net Server & Client TCP Connection Event Handler

[亡魂溺海] 提交于 2019-11-30 12:14:21
问题 I am starting a new project and at the same time have just discovered Poco Library, which I find absolutely amazing. However I am a bit lost, as examples are not plenty. I have a ServerApplication->TCPServer->ServerSocket + TCPServerConnectionFactory->TCPServerconnection approach as indicated by the examples. I am inheriting from the PocoNet classes as instructed. Right now I can run my server as a service, & receive incoming connections. I want to take an event handling approach to the

Poco::Net Server & Client TCP Connection Event Handler

 ̄綄美尐妖づ 提交于 2019-11-30 02:13:29
I am starting a new project and at the same time have just discovered Poco Library, which I find absolutely amazing. However I am a bit lost, as examples are not plenty. I have a ServerApplication->TCPServer->ServerSocket + TCPServerConnectionFactory->TCPServerconnection approach as indicated by the examples. I am inheriting from the PocoNet classes as instructed. Right now I can run my server as a service, & receive incoming connections. I want to take an event handling approach to the following: on a per-connection (or per client) basis, handle events such as data available to read on the

Clion, cMake and POCO

耗尽温柔 提交于 2019-11-30 00:22:03
问题 new guy to c++ and cmake here. I decided to test out cLion and cMake. Im trying to write a simple email client for the command line. Other sources told me that the best way to implement a POP3 and SMTP functions would be to use POCO. Unfortunately, cMake is giving me trouble. the version that came with CLion is 3.2 but the version that my machine is running is 2.8. ~$ cmake --version cmake version 2.8.12.2 First problem. I thought that I could bypass this by just installing POCO and doing the

How to use OpenSSL in POCO C++ library correctly

谁都会走 提交于 2019-11-29 02:39:23
问题 According to the Specification in POCO assistant: Initialize the NetSSL library, as well as the underlying OpenSSL libraries, by calling Poco::Crypto::OpenSSLInitializer::initialize(). Should be called before using any class from the NetSSL library. The NetSSL will be initialized automatically, through Poco::Crypto::OpenSSLInitializer instances or similar mechanisms when creating Context or SSLManager instances. However, it is recommended to call initializeSSL() in any case at application

Poco stops after SMTPClientSession.login

吃可爱长大的小学妹 提交于 2019-11-28 10:42:34
问题 I just started with the Poco library and tried to create an email program (Which I knew virtually nothing about). The following is my code (There may be other problems with it besides the one I've encountered so far, but I just started working on it) int main(int argc, char** argv) { Poco::Net::SocketAddress add("smtp.gmail.com:465"); Poco::Net::StreamSocket sock(add); Poco::Net::SMTPClientSession sess(sock); std::cout << "-"; sess.login( "gmail.com", Poco::Net::SMTPClientSession::AUTH_LOGIN,

CMake: How do I change properties on subdirectory project targets?

血红的双手。 提交于 2019-11-28 09:29:18
I'm trying to organize the targets in my subproject (in this case poco), but I've come to find that properties can't be modified for ALIAS targets. I want the targets in my external project to be in their own folder, instead of sprawled out everywhere in the project tree (say the visual studio generator). Is there an easier way to add projects with my own properties? So instead of: - CMakePredefinedTargets - ALL_BUILD - INSTALL - ... - MyTargets - SomeLibrary - SomeExe - CppUnit - Crypto - Data - ... I want: - CMakePredefinedTargets - ALL_BUILD - INSTALL - ... - MyTargets - SomeLibrary -

How to add Poco library in Visual Studio 2010?

徘徊边缘 提交于 2019-11-28 07:42:52
It's been a while since I've programmed in C++ and right now I'm struggling with this Poco library I'm trying to add to do some HTTP requests. First of all, where do I add poco files, somewhere in my project perhaps? Secondly, I've read something about command prompt and running a script that will compile files but I have to give it an argument which is my visual studio version and the choices are from 70 to 110. How do I find out which one I should use? If someone could provide me a step-by-step guide, I'd really appreciate it. Thank you. Are you referring to POCO C++ Libraries and Tools ? If