Skip to content

Simple UDP Implementation - #27

Open
GregoryFan wants to merge 14 commits into
masterfrom
udp
Open

Simple UDP Implementation#27
GregoryFan wants to merge 14 commits into
masterfrom
udp

Conversation

@GregoryFan

Copy link
Copy Markdown
Contributor

Implements a subclass of Communicant that uses UDP protocol instead of the TCP protocol in other Communicants. This implementation is simple and as such does not include checks for packet reliability nor for packet orderliness.

@GregoryFan
GregoryFan requested a review from Chenxy517 August 18, 2025 15:11

@Chenxy517 Chenxy517 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please see the comments. UDP receiver should not be blocked even sender sends nothing.

addXmitBytes(sent);
}

std::string CommSocketUDP::commRecv(unsigned long numBytes) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe consider adding a timout mechanism in case sender does not send anything and block the commRecv function.

@GregoryFan

Copy link
Copy Markdown
Contributor Author

I've added a timeout function for the commRecv such that the function will stop and continue running the rest of the process if no data is sent within the specified amount of time.

@GregoryFan
GregoryFan requested a review from Chenxy517 August 21, 2025 23:27
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.

2 participants