Skip to content

Commit

Permalink
Update Boost.Asio API.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkskeller committed Jan 10, 2025
1 parent 5b83e3e commit 698b015
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Networking/CryptoPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class CryptoPlayer : public MultiPlayer<ssl_socket*>
{
ssl_ctx ctx;
boost::asio::io_service io_service;
ssl_service io_service;

vector<ssl_socket*> other_sockets;

Expand Down
2 changes: 1 addition & 1 deletion Networking/PlayerCtSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class PlayerCtSocket : public osuCrypto::SocketInterface
{
for (auto& buffer : buffers)
{
auto data = boost::asio::buffer_cast<osuCrypto::u8*>(buffer);
auto data = (octet*) buffer.data();
auto size = boost::asio::buffer_size(buffer);
this->buffers.push_back({data, size});
}
Expand Down
6 changes: 3 additions & 3 deletions Networking/ssl_sockets.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#define SSL_DIR "Player-Data/"
#endif

typedef boost::asio::io_service ssl_service;
typedef boost::asio::io_context ssl_service;

void check_ssl_file(string filename);
void ssl_error(string side, string other, string server, exception& e);
Expand Down Expand Up @@ -46,7 +46,7 @@ class ssl_socket : public boost::asio::ssl::stream<boost::asio::ip::tcp::socket>
typedef boost::asio::ssl::stream<boost::asio::ip::tcp::socket> parent;

public:
ssl_socket(boost::asio::io_service& io_service,
ssl_socket(ssl_service& io_service,
boost::asio::ssl::context& ctx, int plaintext_socket, string other,
string me, bool client) :
parent(io_service, ctx)
Expand All @@ -57,7 +57,7 @@ class ssl_socket : public boost::asio::ssl::stream<boost::asio::ip::tcp::socket>
#endif
lowest_layer().assign(boost::asio::ip::tcp::v4(), plaintext_socket);
set_verify_mode(boost::asio::ssl::verify_peer);
set_verify_callback(boost::asio::ssl::rfc2818_verification(other));
set_verify_callback(boost::asio::ssl::host_name_verification(other));
if (client)
try
{
Expand Down
2 changes: 1 addition & 1 deletion deps/libOTe
Submodule libOTe updated 1 files
+1 −1 cryptoTools

0 comments on commit 698b015

Please sign in to comment.