Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
gamedev8 committed Feb 14, 2024
1 parent a4d43ce commit 62d2743
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/MessagePublisher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,18 @@ namespace gazellemq::server {
// The client has disconnected
beginDisconnect(ring);
} else if (!isDisconnecting && !isZombie) {
streamMessage(readBuffer, res);
forwardMessage(readBuffer, res);

beginReceiveData(ring);
}
}

/**
* Streams the message in chunks to subscribers
* forwards the message to subscribers
* @param buffer
* @param bufferLength
*/
void streamMessage(char const* buffer, size_t bufferLength) {
void forwardMessage(char const* buffer, size_t bufferLength) {
for (size_t i{0}; i < bufferLength; ++i) {
char ch {buffer[i]};
if (parseState == ParseState_messageType) {
Expand Down

0 comments on commit 62d2743

Please sign in to comment.