Skip to content

Commit

Permalink
refactor: clarify a name
Browse files Browse the repository at this point in the history
  • Loading branch information
deniskovalchuk committed Apr 15, 2024
1 parent f7677e3 commit 58dcf20
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/ftp/detail/socket.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class socket : public socket_base

[[nodiscard]] bool has_ssl_support() const override;

void handshake(boost::asio::ssl::stream_base::handshake_type type, boost::system::error_code & ec) override;
void ssl_handshake(boost::asio::ssl::stream_base::handshake_type type, boost::system::error_code & ec) override;

std::size_t write(const char *buf, std::size_t size, boost::system::error_code & ec) override;

Expand Down
2 changes: 1 addition & 1 deletion include/ftp/detail/socket_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class socket_base

[[nodiscard]] virtual bool has_ssl_support() const = 0;

virtual void handshake(boost::asio::ssl::stream_base::handshake_type type, boost::system::error_code & ec) = 0;
virtual void ssl_handshake(boost::asio::ssl::stream_base::handshake_type type, boost::system::error_code & ec) = 0;

virtual std::size_t write(const char *buf, std::size_t size, boost::system::error_code & ec) = 0;

Expand Down
2 changes: 1 addition & 1 deletion include/ftp/detail/ssl_socket.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ssl_socket : public socket_base

[[nodiscard]] bool has_ssl_support() const override;

void handshake(boost::asio::ssl::stream_base::handshake_type type, boost::system::error_code & ec) override;
void ssl_handshake(boost::asio::ssl::stream_base::handshake_type type, boost::system::error_code & ec) override;

std::size_t write(const char *buf, std::size_t size, boost::system::error_code & ec) override;

Expand Down
2 changes: 1 addition & 1 deletion src/control_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void control_connection::ssl_handshake()
{
boost::system::error_code ec;

socket_->handshake(boost::asio::ssl::stream_base::client, ec);
socket_->ssl_handshake(boost::asio::ssl::stream_base::client, ec);

if (ec)
{
Expand Down
2 changes: 1 addition & 1 deletion src/data_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ void data_connection::ssl_handshake()
{
boost::system::error_code ec;

socket_->handshake(boost::asio::ssl::stream_base::client, ec);
socket_->ssl_handshake(boost::asio::ssl::stream_base::client, ec);

if (ec)
{
Expand Down
2 changes: 1 addition & 1 deletion src/socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ bool socket::has_ssl_support() const
return false;
}

void socket::handshake(boost::asio::ssl::stream_base::handshake_type type, boost::system::error_code & ec)
void socket::ssl_handshake(boost::asio::ssl::stream_base::handshake_type type, boost::system::error_code & ec)
{
/* Handshake makes sense only for SSL-sockets. */
}
Expand Down
2 changes: 1 addition & 1 deletion src/ssl_socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ bool ssl_socket::has_ssl_support() const
return true;
}

void ssl_socket::handshake(boost::asio::ssl::stream_base::handshake_type type, boost::system::error_code & ec)
void ssl_socket::ssl_handshake(boost::asio::ssl::stream_base::handshake_type type, boost::system::error_code & ec)
{
socket_.handshake(type, ec);
}
Expand Down

0 comments on commit 58dcf20

Please sign in to comment.