mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
synced 2025-10-30 02:12:32 +00:00
Compare commits
5 Commits
v2.8.0-RC1
...
v2.8.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35ff346901 | ||
|
|
03b39d9d1c | ||
|
|
1a15c4744b | ||
|
|
0417162858 | ||
|
|
75b2b30b67 |
@@ -9,7 +9,7 @@ fullnameOverride: ""
|
||||
images:
|
||||
owsec:
|
||||
repository: tip-tip-wlan-cloud-ucentral.jfrog.io/owsec
|
||||
tag: v2.8.0-RC1
|
||||
tag: v2.8.0
|
||||
pullPolicy: Always
|
||||
# regcred:
|
||||
# registry: tip-tip-wlan-cloud-ucentral.jfrog.io
|
||||
|
||||
@@ -51,7 +51,13 @@ namespace OpenWifi {
|
||||
poco_information(Logger(),"Starting...");
|
||||
Running_=true;
|
||||
Port_ = (int)MicroServiceConfigGetInt("alb.port",15015);
|
||||
Socket_ = std::make_unique<Poco::Net::ServerSocket>(Port_);
|
||||
Poco::Net::IPAddress Addr(Poco::Net::IPAddress::wildcard(
|
||||
Poco::Net::Socket::supportsIPv6() ? Poco::Net::AddressFamily::IPv6
|
||||
: Poco::Net::AddressFamily::IPv4));
|
||||
Poco::Net::SocketAddress SockAddr(Addr, Port_);
|
||||
Poco::Net::ServerSocket ClientSocket(SockAddr, 64);
|
||||
|
||||
Socket_ = std::make_unique<Poco::Net::ServerSocket>(SockAddr, Port_);
|
||||
auto Params = new Poco::Net::HTTPServerParams;
|
||||
Params->setName("ws:alb");
|
||||
Server_ = std::make_unique<Poco::Net::HTTPServer>(new ALBRequestHandlerFactory(Logger()), *Socket_, Params);
|
||||
|
||||
@@ -633,6 +633,18 @@ namespace OpenWifi {
|
||||
ReturnObject(Answer);
|
||||
}
|
||||
|
||||
template<typename T> void Object(const char *Name, const std::vector<T> & Objects) {
|
||||
Poco::JSON::Object Answer;
|
||||
RESTAPI_utils::field_to_json(Answer,Name,Objects);
|
||||
ReturnObject(Answer);
|
||||
}
|
||||
|
||||
template <typename T> void Object(const T &O) {
|
||||
Poco::JSON::Object Answer;
|
||||
O.to_json(Answer);
|
||||
ReturnObject(Answer);
|
||||
}
|
||||
|
||||
Poco::Logger & Logger() { return Logger_; }
|
||||
|
||||
virtual void DoGet() = 0 ;
|
||||
|
||||
Reference in New Issue
Block a user