Skip to content

Commit 55a92c2

Browse files
committed
Update to the latest oatpp API version
1 parent 1354af4 commit 55a92c2

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

client/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ add_library(${project_name}-lib
1818

1919
## link libs
2020

21-
find_package(oatpp 0.19.12 REQUIRED)
22-
find_package(oatpp-websocket 0.19.12 REQUIRED)
21+
find_package(oatpp 1.0.0 REQUIRED)
22+
find_package(oatpp-websocket 1.0.0 REQUIRED)
2323

2424
target_link_libraries(${project_name}-lib
2525
PUBLIC oatpp::oatpp

client/src/ClientSocketListener.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ class ClientSocketListener : public oatpp::websocket::AsyncWebSocket::Listener{
5555
/**
5656
* Called on "close" frame
5757
*/
58-
CoroutineStarter onClose(const std::shared_ptr<AsyncWebSocket>& socket, v_word16 code, const oatpp::String& message) override {
58+
CoroutineStarter onClose(const std::shared_ptr<AsyncWebSocket>& socket, v_uint16 code, const oatpp::String& message) override {
5959
++ FRAMES;
6060
return nullptr; // do nothing
6161
}
6262

6363
/**
6464
* Called on each message frame. After the last message will be called once-again with size == 0 to designate end of the message.
6565
*/
66-
CoroutineStarter readMessage(const std::shared_ptr<AsyncWebSocket>& socket, v_word8 opcode, p_char8 data, oatpp::v_io_size size) override {
66+
CoroutineStarter readMessage(const std::shared_ptr<AsyncWebSocket>& socket, v_uint8 opcode, p_char8 data, oatpp::v_io_size size) override {
6767

6868
if(size == 0) { // message transfer finished
6969

server/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ add_library(${project_name}-lib
1919

2020
## link libs
2121

22-
find_package(oatpp 0.19.12 REQUIRED)
23-
find_package(oatpp-websocket 0.19.12 REQUIRED)
22+
find_package(oatpp 1.0.0 REQUIRED)
23+
find_package(oatpp-websocket 1.0.0 REQUIRED)
2424

2525
target_link_libraries(${project_name}-lib
2626
PUBLIC oatpp::oatpp

server/src/controller/WebSocketListener.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ class WebSocketListener : public oatpp::websocket::AsyncWebSocket::Listener {
4949
/**
5050
* Called on "close" frame
5151
*/
52-
CoroutineStarter onClose(const std::shared_ptr<AsyncWebSocket>& socket, v_word16 code, const oatpp::String& message) override {
52+
CoroutineStarter onClose(const std::shared_ptr<AsyncWebSocket>& socket, v_uint16 code, const oatpp::String& message) override {
5353
++ FRAMES;
5454
return nullptr; // do nothing
5555
}
5656

5757
/**
5858
* Called on each message frame. After the last message will be called once-again with size == 0 to designate end of the message.
5959
*/
60-
CoroutineStarter readMessage(const std::shared_ptr<AsyncWebSocket>& socket, v_word8 opcode, p_char8 data, oatpp::v_io_size size) override {
60+
CoroutineStarter readMessage(const std::shared_ptr<AsyncWebSocket>& socket, v_uint8 opcode, p_char8 data, oatpp::v_io_size size) override {
6161

6262
if(size == 0) { // message transfer finished
6363

server/test/WebSocketTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ class ClientSocketListener : public oatpp::websocket::AsyncWebSocket::Listener{
107107
return nullptr;
108108
}
109109

110-
CoroutineStarter onClose(const std::shared_ptr<AsyncWebSocket>& socket, v_word16 code, const oatpp::String& message) override {
110+
CoroutineStarter onClose(const std::shared_ptr<AsyncWebSocket>& socket, v_uint16 code, const oatpp::String& message) override {
111111
return nullptr;
112112
}
113113

114-
CoroutineStarter readMessage(const std::shared_ptr<AsyncWebSocket>& socket, v_word8 opcode, p_char8 data, oatpp::v_io_size size) override {
114+
CoroutineStarter readMessage(const std::shared_ptr<AsyncWebSocket>& socket, v_uint8 opcode, p_char8 data, oatpp::v_io_size size) override {
115115
if(size == 0) {
116116
auto wholeMessage = m_messageBuffer.toString();
117117
m_messageBuffer.clear();

0 commit comments

Comments
 (0)