Skip to content

Conversation

@Jakio815
Copy link
Collaborator

@Jakio815 Jakio815 commented Dec 5, 2025

Minor Logic Change

There was a bug in the read_secure_message() API where SST_SECURE_COMM messages were not being fully read from the socket.

After reading the message header, the implementation is supposed to read the exact number of bytes indicated by that header. However, the previous code called only a single sst_read_from_socket() call, which retrieves only whatever data happens to be buffered at the TCP layer. Since TCP does not guarantee that an entire payload will arrive in one read, the function often returned incomplete message bodies when data is flooding.

This PR introduces a simple loop that continues reading from the socket until the full number of bytes specified in the header has been received.

README updates.

As mentioned in #55, bullet 1 and 2, I updated the README files to be more descriptive.
I created a README under the examples/, with a high level explanation of all examples, and the main README points this file.

Directory name updates

Update scenario_example to SST_Testbed as mentioned in #55. However, didn't change the structure yet.

@Jakio815 Jakio815 linked an issue Dec 5, 2025 that may be closed by this pull request
3 tasks
@Jakio815 Jakio815 changed the title Fix incomplete reads in read_secure_message() by properly handling partial TCP payloads Fix incomplete reads in read_secure_message() by properly handling partial TCP payloads && README updates Dec 5, 2025
@Jakio815 Jakio815 requested a review from hokeun December 10, 2025 15:56
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
D Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copy link
Member

@hokeun hokeun left a comment

Choose a reason for hiding this comment

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

👍

@Jakio815 Jakio815 merged commit 89e9002 into master Dec 10, 2025
3 of 4 checks passed
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.

Outdated or missing READMEs for c entity examples.

3 participants