Questions tagged [poco-libraries]

The Poco C++ Libraries are modern open source C++ class libraries and frameworks for building network- and internet-based applications that run on desktop, server and embedded systems.

The Poco C++ Libraries are modern open source C++ class libraries and frameworks for building network- and internet-based applications that run on desktop, server and embedded systems.

736 questions
6
votes
2 answers

mutexes and locks

Are the two code samples below equivalent? Poco::ProcessHandle::PID ProcessRunner::processId() const { Poco::ProcessHandle::PID pid = 0; mMutex.lock(); pid = mPID; mMutex.unlock(); return pid; } , Poco::ProcessHandle::PID…
StackedCrooked
  • 34,653
  • 44
  • 154
  • 278
6
votes
1 answer

Problems with loggers hierarchy in Poco Logging Framework

I'm facing some problems when using the Logging Framework. I have a configuration file as following: # core channel logging.channels.c1.class = FileChannel logging.channels.c1.path = /core.log logging.channels.c1.archive =…
Fauth
  • 737
  • 4
  • 11
6
votes
2 answers

poco c++ static linking problems with undefined references to symbols

I'm trying to link to static versions of the POCO C++ libs like this: g++ BCCMain.o -L$_POCO_LIBS -Wl,-Bstatic $_POCO_LIBS/libPocoFoundation.a $_POCO_LIBS/libPocoUtil.a $_POCO_LIBS/libPocoXML.a $_POCO_LIBS/libPocoJSON.a -Wl,-Bdynamic -o…
gregee123
  • 321
  • 3
  • 6
5
votes
2 answers

How to get (used/available/total) disk space with boost or poco?

How to get (used,available,total) disk/directory space with boost or poco? Thanks!
iuwei
  • 317
  • 1
  • 3
  • 13
5
votes
1 answer

What is a good way to handle multithreading with Poco SocketReactor?

So I'm starting to do some research on alternatives for implementing a high volume client/server system, and I'm currently looking at Poco's Reactor framework since I'm using Poco for so much of my application frameworks now. The incoming packet…
Gerald
  • 23,011
  • 10
  • 73
  • 102
5
votes
2 answers

Poco::Net HTTPServer: How to detect disconnected clients?

I'm working on an http server as part of my C++ application, based on Poco::Net HTTP. It's pretty straight-forward, using Poco::Net::HTTPServer, then a Poco::Net::HTTPRequestHandler subclass, implementing void…
ginger
  • 271
  • 1
  • 2
  • 9
5
votes
1 answer

Unable to iterate std::map of Poco::Any

I have a std::map of Poco::Any which I'm trying to iterate and output to a stream but i'm getting a compiler error. My code is below: map::const_iterator it; map::const_iterator end = _map.end(); map
memo
  • 3,554
  • 4
  • 31
  • 36
5
votes
2 answers

How to send websocket PONG response using POCO

I am trying to set up a websocket server using POCO 1.7.5. The sample from POCO found here works well. Lines 111-122 reads (sligthly prettified): WebSocket ws(request, response); char buffer[1024]; int n, flags; do { n = ws.receiveFrame(buffer,…
Stefan Karlsson
  • 1,092
  • 9
  • 21
5
votes
1 answer

Support for MySQL timestamp in the POCO C++ libraries

The POCO libraries support MySQL DATE, TIME and DATETIME columns, but not TIMESTAMP. Selecting values from a TIMESTAMP column raises an "unknown field type" exception, since MYSQL_TYPE_TIMESTAMP is not supported in…
5
votes
1 answer

Does the Poco C++ Library Support positional command line arguments?

I can see no way to support positional command line arguments with Poco's Poco::Util::Application class and related Poco::Util::OptionProcessor. Positional arguments are unnamed arguments on the command line, coming at the end after all other…
Louis Marascio
  • 2,629
  • 24
  • 28
5
votes
1 answer

How to implement a REST API server with POCO C++ Network Library using JSON?

I have been researching about how to do this and all the examples are with text/html. I have tried implement a server api rest using JSON with POCO C++ network libraries but I am not quite sure if it is the correct way to do this. void…
GutiMac
  • 2,402
  • 1
  • 20
  • 27
5
votes
2 answers

Rationale for protected destructor

I have noticed that many Poco classes have a protected destructor. This makes them more annoying to code with. For example here is some of my code: struct W2: Poco::Util::WinRegistryConfiguration { typedef Poco::Util::WinRegistryConfiguration…
M.M
  • 138,810
  • 21
  • 208
  • 365
5
votes
1 answer

How do I cleanly exit from a program that is using Poco::Net::TCPServer?

My server start a Poco::Task which, in turn, start two TCPServer. int TBServer::main(const std::vector& args) { if (!m_helpRequested) { TaskManager tm; tm.start(new ServerTask()); waitForTerminationRequest(); …
Barzo
  • 1,039
  • 1
  • 11
  • 37
5
votes
1 answer

Multithread TCP Server with POCO C++ libraries

I'm trying to develop a TCP Server with POCO C++ libraries. I found some examples here. At first I tried example from Alex but shutdown event didn't work. EchoServer have the same problem. So, then I tried Cesar Ortiz example and got a unusual…
Valera A.
  • 81
  • 1
  • 1
  • 4
5
votes
2 answers

how to keep websocket connect until either-side close?

I'd like to build chat app on websocket, and choose Poco C++ lib as webserver (1.4.6p1). There are multiple user at the same time, poco websocket will be blocked at read frame but automatically released after 60 seconds if nothing is received from…
tiplip
  • 329
  • 5
  • 17
1 2
3
49 50