You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.2 KiB
43 lines
1.2 KiB
/*
|
|
Sog 游戏基础库
|
|
2016 by zouwei
|
|
*/
|
|
|
|
using System.Net;
|
|
|
|
namespace Sog
|
|
{
|
|
/// <summary>
|
|
/// SessionSettings
|
|
/// </summary>
|
|
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; }
|
|
|
|
}
|
|
}
|