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