Skip to content

Commit 6733dd9

Browse files
committed
Added missing XML comments
1 parent b2c1e4b commit 6733dd9

File tree

5 files changed

+53
-2
lines changed

5 files changed

+53
-2
lines changed

MLAPI/Data/PendingClient.cs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,41 @@
44

55
namespace MLAPI.Data
66
{
7+
/// <summary>
8+
/// A class representing a client that is currently in the process of connecting
9+
/// </summary>
710
public class PendingClient
811
{
12+
/// <summary>
13+
/// The ClientId of the client
14+
/// </summary>
915
public uint ClientId;
1016

1117
#if !DISABLE_CRYPTOGRAPHY
1218
internal EllipticDiffieHellman KeyExchange;
1319
#endif
14-
20+
/// <summary>
21+
/// The current AesKey
22+
/// </summary>
1523
public byte[] AesKey;
1624

25+
/// <summary>
26+
/// The state of the connection process for the client
27+
/// </summary>
1728
public State ConnectionState;
1829

30+
/// <summary>
31+
/// The states of a connection
32+
/// </summary>
1933
public enum State
2034
{
35+
/// <summary>
36+
/// Client is in the process of doing the hail handshake
37+
/// </summary>
2138
PendingHail,
39+
/// <summary>
40+
/// Client is in the process of doing the connection handshake
41+
/// </summary>
2242
PendingConnection
2343
}
2444
}

MLAPI/Data/SecuritySendFlags.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,23 @@
22

33
namespace MLAPI.Data
44
{
5+
/// <summary>
6+
/// The security operations of a payload
7+
/// </summary>
58
[Flags]
69
public enum SecuritySendFlags
710
{
11+
/// <summary>
12+
/// No security operations are applied
13+
/// </summary>
814
None = 0x0,
15+
/// <summary>
16+
/// The payload is encrypted
17+
/// </summary>
918
Encrypted = 0x1,
19+
/// <summary>
20+
/// The payload is authenticated
21+
/// </summary>
1022
Authenticated = 0x2
1123
}
1224
}

MLAPI/MonoBehaviours/Core/NetworkingManager.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ internal set
144144
/// Event invoked when custom messages arrive
145145
/// </summary>
146146
public event CustomMessageDelegete OnIncommingCustomMessage;
147+
/// <summary>
148+
/// The current hostname we are connected to, used to validate certificate
149+
/// </summary>
147150
public string ConnectedHostname { get; private set; }
148151
internal byte[] clientAesKey;
149152
internal static event Action OnSingletonReady;

MLAPI/NetworkingManagerComponents/Binary/BitStream.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,11 @@ public void CopyFrom(Stream s, int count = -1)
380380
}
381381
}
382382

383+
/// <summary>
384+
/// Copies urnead bytes from the source stream
385+
/// </summary>
386+
/// <param name="s">The source stream to copy from</param>
387+
/// <param name="count">The max amount of bytes to copy</param>
383388
public void CopyUnreadFrom(Stream s, int count = -1)
384389
{
385390
long currentPosition = s.Position;

MLAPI/NetworkingManagerComponents/Binary/IBitWritable.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,21 @@
55
using System.Text;
66

77
namespace MLAPI.Serialization
8-
{
8+
{
9+
/// <summary>
10+
/// IBitWritable provides a interface for writable types
11+
/// </summary>
912
public interface IBitWritable
1013
{
14+
/// <summary>
15+
/// Writes the contents of the type instance to the stream
16+
/// </summary>
17+
/// <param name="stream">The stream to write to</param>
1118
void Write(Stream stream);
19+
/// <summary>
20+
/// Reads the contents from the stream and applies it to the type instance
21+
/// </summary>
22+
/// <param name="stream">The stream to read from</param>
1223
void Read(Stream stream);
1324
}
1425
}

0 commit comments

Comments
 (0)