Add RemoveSocketFromGroup.

This commit is contained in:
Jean-Baptiste Perrier
2021-02-18 19:40:45 +01:00
parent 94381f356c
commit d1f30a973d
4 changed files with 62 additions and 3 deletions

View File

@@ -82,6 +82,16 @@ bool NetworkBase::GetSocketFromGroup(NetworkSocketGroup& group, uint32 index, Ne
return true;
}
void NetworkBase::RemoveSocketFromGroup(NetworkSocketGroup& group, uint32 index)
{
}
bool NetworkBase::RemoveSocketFromGroup(NetworkSocketGroup& group, NetworkSocket& socket)
{
return true;
}
void NetworkBase::ClearGroup(NetworkSocketGroup& group)
{
group.Count = 0;

View File

@@ -236,6 +236,21 @@ public:
/// <param name="socket">The returned socket.</param>
/// <returns>Returns true on error, otherwise false.</returns>
static bool GetSocketFromGroup(NetworkSocketGroup& group, uint32 index, NetworkSocket* socket);
/// <summary>
/// Removes the socket at the specified index.
/// </summary>
/// <param name="group">The group.</param>
/// <param name="index">The index.</param>
static void RemoveSocketFromGroup(NetworkSocketGroup& group, uint32 index);
/// <summary>
/// Removes the socket if present.
/// </summary>
/// <param name="group">The group.</param>
/// <param name="socket">The socket.</param>
/// <returns>Returns true if the socket is not found, otherwise false.</returns>
static bool RemoveSocketFromGroup(NetworkSocketGroup& group, NetworkSocket& socket);
/// <summary>
/// Clears the socket group.