7. U++ packaged htmlcxx library. Very lightweight but accurate HTML/CSS parsing library with LGPL license.
Added utility function SafeguardHTML (with utf8 conversion from previous function). The main idea is to create 100% safe html output from user input in any encoding.
5. ToJSTime/FromJSTime functions for browser time representation support. Very small, doesn't worth creating package for them.
String WwwFormat(Time tm); bool ScanWwwTime(const char *s, Time& tm); Time ScanWwwTime(const char *s);
void SendReceive_ ( String sendProto, Vector<Value> sendArgs, String receiveProto, dword timeout, void *custom, Ptr<OBJECT> notify, void (OBJECT::*cb)(bool success, Vector<Value> args, void *custom), bool useAcc = false, bool priority = false )
TcpSocket server; server.Listen(port,connections); ServerWorker::ServerThread<CommentWorker>(server); ServerWorker::ClearWorkers_();
#ifndef _commentd_CommentWorker_h_ #define _commentd_CommentWorker_h_ #include <Core/Core.h> #include "ServerWorker.h" using namespace Upp; class CommentWorker : public ServerWorker { public: CommentWorker() { ServerWorker::AddHandler<CommentWorker>("/login", &CommentWorker::HandleAddLogin); ServerWorker::AddHandler<CommentWorker>("/comment", &CommentWorker::HandleAddComment); //... } void HandleAddLogin(const String &request, HttpHeader &header, TcpSocket &socket) { VectorMap<String,String> values = ParseUrlQueryString(header.GetURI()); String valueLogin = values.GetAdd("login"); String valuePass = values.GetAdd("pass"); //... HttpResponseKeepAlive( socket, false, 200, "OK", "text/html; charset=\"utf-8\"", HTML, NULL, VectorMap<String,String>() ); } //... }; #endif
Why is there a need for it to be LGPL?
SerialPort - not just a simple serial port package. It is based on MtAlt and BNF.
....
This package needs further discussion and examples which will follow if someone interests. Should we make new topic for it?