Skip to content

Commit

Permalink
XML doc cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-weiland committed Sep 20, 2021
1 parent 50dc50d commit 3affaa5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 30 deletions.
19 changes: 4 additions & 15 deletions RiptideNetworking/RiptideNetworking/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,19 +119,13 @@ private void Heartbeat(object state)
}
}

/// <summary>Determines whether or not to handle a message from a specific remote endpoint.</summary>
/// <param name="endPoint">The endpoint from which the message was sent.</param>
/// <param name="firstByte">The first byte of the message.</param>
/// <returns><see langword="true"/> if the message should be handled.</returns>
/// <inheritdoc/>
protected override bool ShouldHandleMessageFrom(IPEndPoint endPoint, byte firstByte)
{
return endPoint.Equals(remoteEndPoint);
}

/// <summary>Handles the given data.</summary>
/// <param name="data">The data to handle.</param>
/// <param name="fromEndPoint">The endpoint from which the data was received.</param>
/// <param name="headerType">The header type of the data.</param>
/// <inheritdoc/>
internal override void Handle(byte[] data, IPEndPoint fromEndPoint, HeaderType headerType)
{
Message message = Message.Create(headerType, data);
Expand Down Expand Up @@ -197,10 +191,7 @@ internal override void Handle(byte[] data, IPEndPoint fromEndPoint, HeaderType h
message.Release();
}

/// <summary>Handles the given reliably sent data.</summary>
/// <param name="data">The reliably sent data.</param>
/// <param name="fromEndPoint">The endpoint from which the data was received.</param>
/// <param name="headerType">The header type of the data.</param>
/// <inheritdoc/>
internal override void ReliableHandle(byte[] data, IPEndPoint fromEndPoint, HeaderType headerType)
{
ReliableHandle(data, fromEndPoint, headerType, rudp.SendLockables);
Expand Down Expand Up @@ -256,9 +247,7 @@ private void SendConnect()
Send(Message.Create(HeaderType.connect));
}

/// <summary>Sends an ack message for a sequence ID to a specific endpoint.</summary>
/// <param name="forSeqId">The sequence ID to acknowledge.</param>
/// <param name="toEndPoint">The endpoint to send the ack to.</param>
/// <inheritdoc/>
protected override void SendAck(ushort forSeqId, IPEndPoint toEndPoint)
{
Message message = Message.Create(forSeqId == rudp.SendLockables.LastReceivedSeqId ? HeaderType.ack : HeaderType.ackExtra);
Expand Down
19 changes: 4 additions & 15 deletions RiptideNetworking/RiptideNetworking/Server.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,7 @@ private void Heartbeat(object state)
}
}

/// <summary>Determines whether or not to handle a message from a specific remote endpoint.</summary>
/// <param name="endPoint">The endpoint from which the message was sent.</param>
/// <param name="firstByte">The first byte of the message.</param>
/// <returns><see langword="true"/> if the message should be handled.</returns>
/// <inheritdoc/>
protected override bool ShouldHandleMessageFrom(IPEndPoint endPoint, byte firstByte)
{
lock (clients)
Expand All @@ -123,10 +120,7 @@ protected override bool ShouldHandleMessageFrom(IPEndPoint endPoint, byte firstB
}
}

/// <summary>Handles the given data.</summary>
/// <param name="data">The data to handle.</param>
/// <param name="fromEndPoint">The endpoint from which the data was received.</param>
/// <param name="headerType">The header type of the data.</param>
/// <inheritdoc/>
internal override void Handle(byte[] data, IPEndPoint fromEndPoint, HeaderType headerType)
{
Message message = Message.Create(headerType, data);
Expand Down Expand Up @@ -195,18 +189,13 @@ internal override void Handle(byte[] data, IPEndPoint fromEndPoint, HeaderType h
message.Release();
}

/// <summary>Handles the given reliably sent data.</summary>
/// <param name="data">The reliably sent data.</param>
/// <param name="fromEndPoint">The endpoint from which the data was received.</param>
/// <param name="headerType">The header type of the data.</param>
/// <inheritdoc/>
internal override void ReliableHandle(byte[] data, IPEndPoint fromEndPoint, HeaderType headerType)
{
ReliableHandle(data, fromEndPoint, headerType, clients[fromEndPoint].SendLockables);
}

/// <summary>Sends an acknowledgement for a sequence ID to a specific endpoint.</summary>
/// <param name="forSeqId">The sequence ID to acknowledge.</param>
/// <param name="toEndPoint">The endpoint to send the acknowledgement to.</param>
/// <inheritdoc/>
protected override void SendAck(ushort forSeqId, IPEndPoint toEndPoint)
{
clients[toEndPoint].SendAck(forSeqId);
Expand Down

0 comments on commit 3affaa5

Please sign in to comment.