Skip to content

Commit

Permalink
Update to the latest oatpp API version
Browse files Browse the repository at this point in the history
  • Loading branch information
lganzzzo committed Jan 25, 2020
1 parent 3bedb5e commit 31b5c5c
Show file tree
Hide file tree
Showing 18 changed files with 38 additions and 38 deletions.
4 changes: 2 additions & 2 deletions async-server-rooms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ add_library(${project_name}-lib

## link libs

find_package(oatpp 0.19.12 REQUIRED)
find_package(oatpp-websocket 0.19.12 REQUIRED)
find_package(oatpp 1.0.0 REQUIRED)
find_package(oatpp-websocket 1.0.0 REQUIRED)

target_link_libraries(${project_name}-lib
PUBLIC oatpp::oatpp
Expand Down
4 changes: 2 additions & 2 deletions async-server-rooms/src/rooms/Peer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ oatpp::async::CoroutineStarter Peer::onPong(const std::shared_ptr<AsyncWebSocket
return nullptr; // do nothing
}

oatpp::async::CoroutineStarter Peer::onClose(const std::shared_ptr<AsyncWebSocket>& socket, v_word16 code, const oatpp::String& message) {
oatpp::async::CoroutineStarter Peer::onClose(const std::shared_ptr<AsyncWebSocket>& socket, v_uint16 code, const oatpp::String& message) {
return nullptr; // do nothing
}

oatpp::async::CoroutineStarter Peer::readMessage(const std::shared_ptr<AsyncWebSocket>& socket, v_word8 opcode, p_char8 data, oatpp::v_io_size size) {
oatpp::async::CoroutineStarter Peer::readMessage(const std::shared_ptr<AsyncWebSocket>& socket, v_uint8 opcode, p_char8 data, oatpp::v_io_size size) {

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

Expand Down
4 changes: 2 additions & 2 deletions async-server-rooms/src/rooms/Peer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ class Peer : public oatpp::websocket::AsyncWebSocket::Listener {

CoroutineStarter onPing(const std::shared_ptr<AsyncWebSocket>& socket, const oatpp::String& message) override;
CoroutineStarter onPong(const std::shared_ptr<AsyncWebSocket>& socket, const oatpp::String& message) override;
CoroutineStarter onClose(const std::shared_ptr<AsyncWebSocket>& socket, v_word16 code, const oatpp::String& message) override;
CoroutineStarter readMessage(const std::shared_ptr<AsyncWebSocket>& socket, v_word8 opcode, p_char8 data, oatpp::v_io_size size) override;
CoroutineStarter onClose(const std::shared_ptr<AsyncWebSocket>& socket, v_uint16 code, const oatpp::String& message) override;
CoroutineStarter readMessage(const std::shared_ptr<AsyncWebSocket>& socket, v_uint8 opcode, p_char8 data, oatpp::v_io_size size) override;

};

Expand Down
4 changes: 2 additions & 2 deletions async-server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ add_library(${project_name}-lib

## link libs

find_package(oatpp 0.19.12 REQUIRED)
find_package(oatpp-websocket 0.19.12 REQUIRED)
find_package(oatpp 1.0.0 REQUIRED)
find_package(oatpp-websocket 1.0.0 REQUIRED)

target_link_libraries(${project_name}-lib
PUBLIC oatpp::oatpp
Expand Down
4 changes: 2 additions & 2 deletions async-server/src/websocket/WSListener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ oatpp::async::CoroutineStarter WSListener::onPong(const std::shared_ptr<AsyncWeb
return nullptr; // do nothing
}

oatpp::async::CoroutineStarter WSListener::onClose(const std::shared_ptr<AsyncWebSocket>& socket, v_word16 code, const oatpp::String& message) {
oatpp::async::CoroutineStarter WSListener::onClose(const std::shared_ptr<AsyncWebSocket>& socket, v_uint16 code, const oatpp::String& message) {
OATPP_LOGD(TAG, "onClose code=%d", code);
return nullptr; // do nothing
}

oatpp::async::CoroutineStarter WSListener::readMessage(const std::shared_ptr<AsyncWebSocket>& socket, v_word8 opcode, p_char8 data, oatpp::v_io_size size) {
oatpp::async::CoroutineStarter WSListener::readMessage(const std::shared_ptr<AsyncWebSocket>& socket, v_uint8 opcode, p_char8 data, oatpp::v_io_size size) {

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

Expand Down
4 changes: 2 additions & 2 deletions async-server/src/websocket/WSListener.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ class WSListener : public oatpp::websocket::AsyncWebSocket::Listener {
/**
* Called on "close" frame
*/
CoroutineStarter onClose(const std::shared_ptr<AsyncWebSocket>& socket, v_word16 code, const oatpp::String& message) override;
CoroutineStarter onClose(const std::shared_ptr<AsyncWebSocket>& socket, v_uint16 code, const oatpp::String& message) override;

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

};

Expand Down
6 changes: 3 additions & 3 deletions client-binance.com/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ add_library(${project_name}-lib

## link libs

find_package(oatpp 0.19.12 REQUIRED)
find_package(oatpp-websocket 0.19.12 REQUIRED)
find_package(oatpp-mbedtls 0.19.12 REQUIRED)
find_package(oatpp 1.0.0 REQUIRED)
find_package(oatpp-websocket 1.0.0 REQUIRED)
find_package(oatpp-mbedtls 1.0.0 REQUIRED)

target_link_libraries(${project_name}-lib
PUBLIC oatpp::oatpp
Expand Down
4 changes: 2 additions & 2 deletions client-binance.com/src/WSListener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ void WSListener::onPong(const WebSocket& socket, const oatpp::String& message) {
OATPP_LOGD(TAG, "onPong");
}

void WSListener::onClose(const WebSocket& socket, v_word16 code, const oatpp::String& message) {
void WSListener::onClose(const WebSocket& socket, v_uint16 code, const oatpp::String& message) {
OATPP_LOGD(TAG, "onClose code=%d", code);
}

void WSListener::readMessage(const WebSocket& socket, v_word8 opcode, p_char8 data, oatpp::v_io_size size) {
void WSListener::readMessage(const WebSocket& socket, v_uint8 opcode, p_char8 data, oatpp::v_io_size size) {

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

Expand Down
4 changes: 2 additions & 2 deletions client-binance.com/src/WSListener.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ class WSListener : public oatpp::websocket::WebSocket::Listener {
/**
* Called on "close" frame
*/
void onClose(const WebSocket& socket, v_word16 code, const oatpp::String& message) override;
void onClose(const WebSocket& socket, v_uint16 code, const oatpp::String& message) override;

/**
* Called on each message frame. After the last message will be called once-again with size == 0 to designate end of the message.
*/
void readMessage(const WebSocket& socket, v_word8 opcode, p_char8 data, oatpp::v_io_size size) override;
void readMessage(const WebSocket& socket, v_uint8 opcode, p_char8 data, oatpp::v_io_size size) override;

public:

Expand Down
6 changes: 3 additions & 3 deletions client-mbedtls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ add_library(${project_name}-lib

## link libs

find_package(oatpp 0.19.12 REQUIRED)
find_package(oatpp-websocket 0.19.12 REQUIRED)
find_package(oatpp-mbedtls 0.19.12 REQUIRED)
find_package(oatpp 1.0.0 REQUIRED)
find_package(oatpp-websocket 1.0.0 REQUIRED)
find_package(oatpp-mbedtls 1.0.0 REQUIRED)

target_link_libraries(${project_name}-lib
PUBLIC oatpp::oatpp
Expand Down
4 changes: 2 additions & 2 deletions client-mbedtls/src/WSListener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ void WSListener::onPong(const WebSocket& socket, const oatpp::String& message) {
OATPP_LOGD(TAG, "onPong");
}

void WSListener::onClose(const WebSocket& socket, v_word16 code, const oatpp::String& message) {
void WSListener::onClose(const WebSocket& socket, v_uint16 code, const oatpp::String& message) {
OATPP_LOGD(TAG, "onClose code=%d", code);
}

void WSListener::readMessage(const WebSocket& socket, v_word8 opcode, p_char8 data, oatpp::v_io_size size) {
void WSListener::readMessage(const WebSocket& socket, v_uint8 opcode, p_char8 data, oatpp::v_io_size size) {

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

Expand Down
4 changes: 2 additions & 2 deletions client-mbedtls/src/WSListener.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ class WSListener : public oatpp::websocket::WebSocket::Listener {
/**
* Called on "close" frame
*/
void onClose(const WebSocket& socket, v_word16 code, const oatpp::String& message) override;
void onClose(const WebSocket& socket, v_uint16 code, const oatpp::String& message) override;

/**
* Called on each message frame. After the last message will be called once-again with size == 0 to designate end of the message.
*/
void readMessage(const WebSocket& socket, v_word8 opcode, p_char8 data, oatpp::v_io_size size) override;
void readMessage(const WebSocket& socket, v_uint8 opcode, p_char8 data, oatpp::v_io_size size) override;

};

Expand Down
4 changes: 2 additions & 2 deletions client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ add_library(${project_name}-lib

## link libs

find_package(oatpp 0.19.12 REQUIRED)
find_package(oatpp-websocket 0.19.12 REQUIRED)
find_package(oatpp 1.0.0 REQUIRED)
find_package(oatpp-websocket 1.0.0 REQUIRED)

target_link_libraries(${project_name}-lib
PUBLIC oatpp::oatpp
Expand Down
4 changes: 2 additions & 2 deletions client/src/WSListener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ void WSListener::onPong(const WebSocket& socket, const oatpp::String& message) {
OATPP_LOGD(TAG, "onPong");
}

void WSListener::onClose(const WebSocket& socket, v_word16 code, const oatpp::String& message) {
void WSListener::onClose(const WebSocket& socket, v_uint16 code, const oatpp::String& message) {
OATPP_LOGD(TAG, "onClose code=%d", code);
}

void WSListener::readMessage(const WebSocket& socket, v_word8 opcode, p_char8 data, oatpp::v_io_size size) {
void WSListener::readMessage(const WebSocket& socket, v_uint8 opcode, p_char8 data, oatpp::v_io_size size) {

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

Expand Down
4 changes: 2 additions & 2 deletions client/src/WSListener.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ class WSListener : public oatpp::websocket::WebSocket::Listener {
/**
* Called on "close" frame
*/
void onClose(const WebSocket& socket, v_word16 code, const oatpp::String& message) override;
void onClose(const WebSocket& socket, v_uint16 code, const oatpp::String& message) override;

/**
* Called on each message frame. After the last message will be called once-again with size == 0 to designate end of the message.
*/
void readMessage(const WebSocket& socket, v_word8 opcode, p_char8 data, oatpp::v_io_size size) override;
void readMessage(const WebSocket& socket, v_uint8 opcode, p_char8 data, oatpp::v_io_size size) override;

};

Expand Down
4 changes: 2 additions & 2 deletions server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ add_library(${project_name}-lib

## link libs

find_package(oatpp 0.19.12 REQUIRED)
find_package(oatpp-websocket 0.19.12 REQUIRED)
find_package(oatpp 1.0.0 REQUIRED)
find_package(oatpp-websocket 1.0.0 REQUIRED)

target_link_libraries(${project_name}-lib
PUBLIC oatpp::oatpp
Expand Down
4 changes: 2 additions & 2 deletions server/src/websocket/WSListener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ void WSListener::onPong(const WebSocket& socket, const oatpp::String& message) {
OATPP_LOGD(TAG, "onPong");
}

void WSListener::onClose(const WebSocket& socket, v_word16 code, const oatpp::String& message) {
void WSListener::onClose(const WebSocket& socket, v_uint16 code, const oatpp::String& message) {
OATPP_LOGD(TAG, "onClose code=%d", code);
}

void WSListener::readMessage(const WebSocket& socket, v_word8 opcode, p_char8 data, oatpp::v_io_size size) {
void WSListener::readMessage(const WebSocket& socket, v_uint8 opcode, p_char8 data, oatpp::v_io_size size) {

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

Expand Down
4 changes: 2 additions & 2 deletions server/src/websocket/WSListener.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ class WSListener : public oatpp::websocket::WebSocket::Listener {
/**
* Called on "close" frame
*/
void onClose(const WebSocket& socket, v_word16 code, const oatpp::String& message) override;
void onClose(const WebSocket& socket, v_uint16 code, const oatpp::String& message) override;

/**
* Called on each message frame. After the last message will be called once-again with size == 0 to designate end of the message.
*/
void readMessage(const WebSocket& socket, v_word8 opcode, p_char8 data, oatpp::v_io_size size) override;
void readMessage(const WebSocket& socket, v_uint8 opcode, p_char8 data, oatpp::v_io_size size) override;

};

Expand Down

0 comments on commit 31b5c5c

Please sign in to comment.