/// <summary> /// Wraps a LidgrenClientChannel. /// </summary> /// <param name="inner"></param> protected LidgrenClientChannelWrapper(LidgrenClientChannel inner) : base("**", null, 0, null, null) { Inner = inner; Inner.Closed += OnConnectionClose; Inner.Received += OnReceive; }
/// <summary> /// Creates client channel instance. /// </summary> public SharedLidgrenClientChannel(string clientId, LidgrenClientChannel inner) : base(inner) { this.clientId = clientId; if (SharedChannels.ContainsKey(clientId)) { LidgrenClientChannel shared = SharedChannels[clientId].Inner; inner.Client = shared.Client; } else { // Force Client to be a NetPeer, not a NetClient Inner.Client = new NetPeer(Inner.Client.Configuration); // Ensure incoming connections are disabled Inner.Client.Configuration.AcceptIncomingConnections = false; SharedChannels[clientId] = this; } }
/// <summary> /// Wraps a LidgrenClientChannel. /// </summary> /// <param name="inner"></param> public DurableLidgrenClientChannel(LidgrenClientChannel inner) : base(inner) { }