/* Sog 游戏基础库 2016 by zouwei */ using System.Net; namespace Sog { /// /// SessionSettings /// public class SessionSettings { public SessionSettings(int maxConnections, int backlog, int maxAcceptOps, int bufferSize, int port) : this(maxConnections, backlog, maxAcceptOps, bufferSize, new IPEndPoint(IPAddress.Any, port)) { } public SessionSettings(int maxConnections, int backlog, int maxAcceptOps, int bufferSize, IPEndPoint localEndPoint) { this.MaxConnections = maxConnections; this.NumOfSaeaForRecSend = 2 * maxConnections; this.Backlog = backlog; this.MaxAcceptOps = maxAcceptOps; this.BufferSize = bufferSize; this.LocalEndPoint = localEndPoint; } public int MaxConnections { get; private set; } public int NumOfSaeaForRecSend { get; private set; } public int Backlog { get; private set; } public int MaxAcceptOps { get; private set; } public int BufferSize { get; private set; } public IPEndPoint LocalEndPoint { get; private set; } } }