Exemplo n.º 1
0
 /// <summary>
 /// Constructs a server side LANLobbyConnection object.
 /// </summary>
 public LANLobbyConnection(LANLobbyServer lanServer)
     : base(LobbyConnectionType.SERVER_SIDE)
 {
     this.lanServer              = lanServer;
     this.connection             = null;
     this.stream                 = null;
     this.outBuffer              = new byte[NetworkingSystemConstants.TCP_CONNECTION_BUFFER_DEFAULT_LENGTH];
     this.inBuffer               = new byte[NetworkingSystemConstants.TCP_CONNECTION_BUFFER_DEFAULT_LENGTH];
     this.lastUncommittedPackage = null;
     this.unparsedOffset         = 0;
     this.unparsedCount          = 0;
 }
Exemplo n.º 2
0
 /// <see cref="Network.CreateLocalLobby_i"/>
 protected override LobbyServer CreateLocalLobby_i(int maxClients, ILobbyListener listener)
 {
     try
     {
         LobbyServer server = new LANLobbyServer(maxClients, listener, this.wellKnownBroadcastPorts);
         return(server);
     }
     catch (Exception ex)
     {
         TraceManager.WriteExceptionAllTrace(ex, false);
         return(null);
     }
 }