You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-06 02:11:06 +09:00
Added missing XML comments
This commit is contained in:
@@ -171,6 +171,9 @@ namespace Lidgren.Network
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads an unsigned 16 bit integer
|
||||
/// </summary>
|
||||
[CLSCompliant(false)]
|
||||
#if UNSAFE
|
||||
public static unsafe ushort ReadUInt16(byte[] fromBuffer, int numberOfBits, int readBitOffset)
|
||||
@@ -283,6 +286,9 @@ namespace Lidgren.Network
|
||||
//[CLSCompliant(false)]
|
||||
//public static ulong ReadUInt64(byte[] fromBuffer, int numberOfBits, int readBitOffset)
|
||||
|
||||
/// <summary>
|
||||
/// Writes un unsigned 16 bit integer
|
||||
/// </summary>
|
||||
[CLSCompliant(false)]
|
||||
public static int WriteUInt16(ushort source, int numberOfBits, byte[] destination, int destinationBitOffset)
|
||||
{
|
||||
|
||||
@@ -27,12 +27,21 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace Lidgren.Network
|
||||
{
|
||||
/// <summary>
|
||||
/// Utility struct for writing Singles
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
public struct SingleUIntUnion
|
||||
{
|
||||
/// <summary>
|
||||
/// Value as a 32 bit float
|
||||
/// </summary>
|
||||
[FieldOffset(0)]
|
||||
public float SingleValue;
|
||||
|
||||
/// <summary>
|
||||
/// Value as an unsigned 32 bit integer
|
||||
/// </summary>
|
||||
[FieldOffset(0)]
|
||||
[CLSCompliant(false)]
|
||||
public uint UIntValue;
|
||||
|
||||
@@ -6,6 +6,9 @@ namespace Lidgren.Network
|
||||
{
|
||||
public partial class NetBuffer
|
||||
{
|
||||
/// <summary>
|
||||
/// Number of bytes to overallocate for each message to avoid resizing
|
||||
/// </summary>
|
||||
protected const int c_overAllocateAmount = 4;
|
||||
|
||||
private static readonly Dictionary<Type, MethodInfo> s_readMethods;
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Lidgren.Network
|
||||
private readonly string m_appIdentifier;
|
||||
private string m_networkThreadName;
|
||||
private IPAddress m_localAddress;
|
||||
private IPAddress m_broadcastAddress;
|
||||
private IPAddress m_broadcastAddress;
|
||||
internal bool m_acceptIncomingConnections;
|
||||
internal int m_maximumConnections;
|
||||
internal int m_defaultOutgoingMessageCapacity;
|
||||
@@ -77,7 +77,7 @@ namespace Lidgren.Network
|
||||
m_disabledTypes = NetIncomingMessageType.ConnectionApproval | NetIncomingMessageType.UnconnectedData | NetIncomingMessageType.VerboseDebugMessage | NetIncomingMessageType.ConnectionLatencyUpdated;
|
||||
m_networkThreadName = "Lidgren network thread";
|
||||
m_localAddress = IPAddress.Any;
|
||||
m_broadcastAddress = IPAddress.Broadcast;
|
||||
m_broadcastAddress = IPAddress.Broadcast;
|
||||
var ip = NetUtility.GetBroadcastAddress();
|
||||
if (ip != null)
|
||||
{
|
||||
@@ -292,16 +292,19 @@ namespace Lidgren.Network
|
||||
}
|
||||
}
|
||||
|
||||
public IPAddress BroadcastAddress
|
||||
{
|
||||
get { return m_broadcastAddress; }
|
||||
set
|
||||
{
|
||||
if (m_isLocked)
|
||||
throw new NetException(c_isLockedMessage);
|
||||
m_broadcastAddress = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the local broadcast address to use when broadcasting
|
||||
/// </summary>
|
||||
public IPAddress BroadcastAddress
|
||||
{
|
||||
get { return m_broadcastAddress; }
|
||||
set
|
||||
{
|
||||
if (m_isLocked)
|
||||
throw new NetException(c_isLockedMessage);
|
||||
m_broadcastAddress = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the local port to bind to. Defaults to 0. Cannot be changed once NetPeer is initialized.
|
||||
|
||||
@@ -35,7 +35,14 @@ namespace Lidgren.Network
|
||||
/// </summary>
|
||||
public static class NetUtility
|
||||
{
|
||||
/// <summary>
|
||||
/// Resolve endpoint callback
|
||||
/// </summary>
|
||||
public delegate void ResolveEndPointCallback(IPEndPoint endPoint);
|
||||
|
||||
/// <summary>
|
||||
/// Resolve address callback
|
||||
/// </summary>
|
||||
public delegate void ResolveAddressCallback(IPAddress adr);
|
||||
|
||||
/// <summary>
|
||||
@@ -260,6 +267,9 @@ namespace Lidgren.Network
|
||||
return new string(c);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the local broadcast address
|
||||
/// </summary>
|
||||
public static IPAddress GetBroadcastAddress()
|
||||
{
|
||||
#if __ANDROID__
|
||||
@@ -560,6 +570,9 @@ namespace Lidgren.Network
|
||||
return NetDeliveryMethod.Unreliable;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a comma delimited string from a lite of items
|
||||
/// </summary>
|
||||
public static string MakeCommaDelimitedList<T>(IList<T> list)
|
||||
{
|
||||
var cnt = list.Count;
|
||||
|
||||
Reference in New Issue
Block a user