Skip to content

Conversation

Jadit19
Copy link
Member

@Jadit19 Jadit19 commented Jun 22, 2025

fixes #14

@Jadit19 Jadit19 requested a review from Copilot June 22, 2025 07:29
Copy link

@Copilot 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 implements improvements to timeout handling and error response handling for the network client. Key changes include updating print method signatures to include const qualifiers, adding a buildDefaultResponse helper to centralize error responses based on HTTP status codes, and revising the non-blocking connection logic in the client.

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/messages/response.cpp Updated print() signature with const qualifiers to support functional const correctness.
src/messages/request.cpp Similar update to print() for consistency.
src/helpers/client.cpp Added buildDefaultResponse and enhanced error/timeout handling in the send() method.
src/client/client.cpp Revised non-blocking connect() using fcntl, select, and improved timeout settings.
include/mochios/messages/*.h Updated method declarations to match the new const-qualified print() signature.
include/mochios/client/options.h Added a timeout field to the Connection struct simplifying timeout configuration.
example/main.cpp Updated error handling in the main driver code to capture and report connection issues.

Copy link

Build successful! 🎉

@Jadit19 Jadit19 merged commit 62df53c into main Jun 22, 2025
1 check passed
@Jadit19 Jadit19 deleted the fix/14 branch June 22, 2025 07:32
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.

timeout handling
1 participant