Skip to content

Conversation

@DarkPhoenix42
Copy link
Contributor

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the server request manager to fix build errors and update the code to use the new IClientHandler interface and revised ClientInfo handling. Key changes include:

  • Replacing the old ClientHandler class with the IClientHandler interface.
  • Updating test functions (e.g., connect_test_client) to return a tuple with a success flag.
  • Adjusting ConnectionManager and request manager implementations to use the new client information model.

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/unittests/server/server_connection_manager_test.cpp Updated test signatures and assertions to match the new ClientInfo tuple.
src/server/connection_manager.cpp Modified client handling and request processing using the new interface.
src/server/client_info.cpp Introduced the ClientInfo and FileSystemTree implementation.
include/server/request_manager.hpp Revised the ClientHandler interface and added client_info dependency.
include/server/connection_manager.hpp Updated to utilize IClientHandler instead of the old ClientHandler.
include/server/client_info.hpp Added definitions for ClientInfo and FileSystemTree.
Files not reviewed (1)
  • src/server/CMakeLists.txt: Language not supported

}
m_client_sockets.clear();
}

Copy link

Copilot AI Apr 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding or updating documentation for connect_test_client() to clarify its new return type, including the success flag, for better clarity in test behavior.

Suggested change
/**
* Establishes a test client connection to the server.
*
* @return A pair containing:
* - ClientInfo: Information about the connected client, including
* its socket, encryption key, address, and port.
* - bool: A success flag indicating whether the connection and
* key exchange were successful (true) or not (false).
*/

Copilot uses AI. Check for mistakes.
@DarkPhoenix42 DarkPhoenix42 changed the title refactor(server-request-manager): fix build errors and major refactors Draft: refactor(server-request-manager): fix build errors and major refactors Apr 30, 2025
@DarkPhoenix42 DarkPhoenix42 force-pushed the refactor/synchronization branch 3 times, most recently from 9f69d0c to 9ded991 Compare April 30, 2025 17:32
Signed-off-by: Praneeth Sarode <praneethsarode@gmail.com>
@DarkPhoenix42 DarkPhoenix42 force-pushed the refactor/synchronization branch from 9ded991 to e900a03 Compare April 30, 2025 17:37
fenris::Response handle_request(const fenris::Request &request,
ClientInfo &client_info);

void initialize_file_system_tree();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is not defined anywhere. Please look into it.


class ClientHandler : public IClientHandler {
public:
explicit ClientHandler();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any need for declaring a custom constructor without a custom destructor? The constructor is not defined. Maybe you wanted to call initialize_file_system_tree inside the constructor.

@v1bh475u
Copy link
Contributor

closing this as already done in #64

@v1bh475u v1bh475u closed this May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants