Skip to content

Commit

Permalink
iox-#27 Add releaseQueuedRequests to server port
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Feb 11, 2022
1 parent 14981a3 commit 902468f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ class ServerPortUser : public BasePort
/// @param[in] chunkHeader, pointer to the ChunkHeader to release
void releaseRequest(const RequestHeader* const requestHeader) noexcept;

/// @brief Release all the requests that are currently queued up.
void releaseQueuedRequests() noexcept;

/// @brief check if there are requests in the queue
/// @return if there are requests in the queue return true, otherwise false
bool hasNewRequests() const noexcept;
Expand Down
5 changes: 5 additions & 0 deletions iceoryx_posh/source/popo/ports/server_port_user.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ void ServerPortUser::releaseRequest(const RequestHeader* const requestHeader) no
}
}

void ServerPortUser::releaseQueuedRequests() noexcept
{
m_chunkReceiver.clear();
}

bool ServerPortUser::hasNewRequests() const noexcept
{
return !m_chunkReceiver.empty();
Expand Down

0 comments on commit 902468f

Please sign in to comment.