Beispiel #1
0
        public SteamP2PServer(int maxConnections) : base(maxConnections)
        {
            BannedAddresses             = new List <string>();
            commonServerLogic           = new CommonServerLogic(this);
            m_CallbackP2PSessionRequest = Callback <P2PSessionRequest_t> .Create(OnP2PSessionRequest);

            m_CallbackP2PSessionConnectFail = Callback <P2PSessionConnectFail_t> .Create(OnP2PSessionConnectFail);
        }
 public TCPServer(int maxConnections) : base(maxConnections)
 {
     AcceptingConnections = true;
     BannedAddresses      = new List <string>();
     commonServerLogic    = new CommonServerLogic(this);
     if (maxConnections > 128)
     {
         bufferManager = new BufferManager(8192, 128, (maxConnections / 128) + 1);
     }
     else
     {
         bufferManager = new BufferManager(8192, maxConnections, 2);
     }
 }
Beispiel #3
0
 public UDPServer(int maxConnections) : base(maxConnections)
 {
     AcceptingConnections = true;
     BannedAddresses      = new List <string>();
     commonServerLogic    = new CommonServerLogic(this);
 }
Beispiel #4
0
 public FacepunchP2PServer(int maxConnections) : base(maxConnections)
 {
     StartAcceptingConnections();
     BannedAddresses   = new List <string>();
     commonServerLogic = new CommonServerLogic(this);
 }
 /// <summary>
 /// Create the FacepunchP2PServer object with specified number of slots
 /// </summary>
 /// <param name="maxConnections">Maximum number of clients to accept</param>
 public FacepunchP2PServer(int maxConnections) : base(maxConnections)
 {
     BannedAddresses   = new List <string>();
     commonServerLogic = new CommonServerLogic(this);
     SteamNetworking.OnP2PSessionRequest += OnP2PSessionRequest;
 }