File tree Expand file tree Collapse file tree 6 files changed +11
-14
lines changed Expand file tree Collapse file tree 6 files changed +11
-14
lines changed Original file line number Diff line number Diff line change 11jobs :
2- - job : ubuntu_16_04
3- displayName : ' Build - Ubuntu 16 .04'
2+ - job : ubuntu_20_04
3+ displayName : ' Build - Ubuntu 20 .04'
44 continueOnError : false
55 pool :
6- vmImage : ' Ubuntu 16 .04'
6+ vmImage : ' ubuntu-20 .04'
77 container :
88 image : lganzzzo/ubuntu-cmake:latest
99 workspace :
Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ add_library(${project_name}-lib
1818
1919## link libs
2020
21- find_package (oatpp 1.2.5 REQUIRED)
22- find_package (oatpp-websocket 1.2.5 REQUIRED)
21+ find_package (oatpp 1.3.0 REQUIRED)
22+ find_package (oatpp-websocket 1.3.0 REQUIRED)
2323
2424target_link_libraries (${project_name} -lib
2525 PUBLIC oatpp::oatpp
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ class ClientCoroutine : public oatpp::async::Coroutine<ClientCoroutine> {
150150 }
151151
152152
153- Action onConnected (const std::shared_ptr <oatpp::data::stream::IOStream>& connection) {
153+ Action onConnected (const oatpp::provider::ResourceHandle <oatpp::data::stream::IOStream>& connection) {
154154 ++ SOCKETS;
155155 m_socket = oatpp::websocket::AsyncWebSocket::createShared (connection, true /* maskOutgoingMessages for clients always true */ );
156156
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ add_library(${project_name}-lib
1919
2020## link libs
2121
22- find_package (oatpp 1.2.5 REQUIRED)
23- find_package (oatpp-websocket 1.2.5 REQUIRED)
22+ find_package (oatpp 1.3.0 REQUIRED)
23+ find_package (oatpp-websocket 1.3.0 REQUIRED)
2424
2525target_link_libraries (${project_name} -lib
2626 PUBLIC oatpp::oatpp
Original file line number Diff line number Diff line change @@ -52,14 +52,11 @@ void run(const oatpp::base::CommandLineArguments& args) {
5252 AppComponent components (args); // Create scope Environment components
5353
5454 /* create ApiControllers and add endpoints to router */
55-
5655 auto router = components.httpRouter .getObject ();
57-
58- auto myController = MyController::createShared ();
59- myController->addEndpointsToRouter (router);
56+
57+ router->addController (MyController::createShared ());
6058
6159 /* create servers */
62-
6360 OATPP_COMPONENT (std::shared_ptr<std::list<std::shared_ptr<oatpp::network::ServerConnectionProvider>>>, connectionProviders);
6461
6562 std::list<std::thread> threads;
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ class ClientCoroutine : public oatpp::async::Coroutine<ClientCoroutine> {
151151 return connector->connectAsync (" ws" ).callbackTo (&ClientCoroutine::onConnected);
152152 }
153153
154- Action onConnected (const std::shared_ptr <oatpp::data::stream::IOStream>& connection) {
154+ Action onConnected (const oatpp::provider::ResourceHandle <oatpp::data::stream::IOStream>& connection) {
155155 socket = oatpp::websocket::AsyncWebSocket::createShared (connection, true );
156156 socket->setListener (std::make_shared<ClientSocketListener>());
157157 executor->execute <ClientSenderCoroutine>(socket);
You can’t perform that action at this time.
0 commit comments