Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/bitcoin/network/channels/channel_http.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ class BCT_API channel_http
virtual void set_authorized(const http::request& request) NOEXCEPT;

/// Dispatch request to subscribers by verb type.
virtual void dispatch(const http::request_cptr& request) NOEXCEPT;
virtual void dispatch(const http::request_ptr& request) NOEXCEPT;

/// Size and assign response_buffer_ if value type is json or json-rpc.
virtual void assign_json_buffer(http::response& response) NOEXCEPT;

/// Handlers.
virtual void handle_receive(const code& ec, size_t bytes,
const http::request_cptr& request) NOEXCEPT;
const http::request_ptr& request) NOEXCEPT;
virtual void handle_send(const code& ec, size_t bytes, bool notification,
const std::string& message, const result_handler& handler) NOEXCEPT;

Expand Down
7 changes: 7 additions & 0 deletions include/bitcoin/network/messages/http_body.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@ struct BCT_API body
return std::get<Inner>(value());
}

template <typename Inner>
inline Inner& get() NOEXCEPT
{
BC_ASSERT(contains<Inner>());
return std::get<Inner>(inner_.value());
}

private:
std::optional<body_value> inner_{};
};
Expand Down
4 changes: 4 additions & 0 deletions include/bitcoin/network/ssl/wolfssl/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -2213,7 +2213,11 @@ static WC_INLINE unsigned int my_psk_client_cs_cb(WOLFSSL* ssl,

#elif defined(USE_WINDOWS_API)

/* LIBBITCOIN: fix warning when WIN32_LEAN_AND_MEAN is already defined. */
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif

#define _WINSOCKAPI_ /* block inclusion of winsock.h header file */
#include <windows.h>
#undef _WINSOCKAPI_ /* undefine it for MINGW winsock2.h header file */
Expand Down
4 changes: 2 additions & 2 deletions src/channels/channel_http.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void channel_http::receive() NOEXCEPT
}

void channel_http::handle_receive(const code& ec, size_t bytes,
const http::request_cptr& request) NOEXCEPT
const http::request_ptr& request) NOEXCEPT
{
BC_ASSERT(stranded());

Expand Down Expand Up @@ -149,7 +149,7 @@ void channel_http::handle_receive(const code& ec, size_t bytes,
}

// Wrap the http request as a tagged verb request and dispatch by type.
void channel_http::dispatch(const request_cptr& request) NOEXCEPT
void channel_http::dispatch(const request_ptr& request) NOEXCEPT
{
BC_ASSERT(stranded());

Expand Down