public NetworkPersistenceManager(Client client) { this.client = client; subscription = client.Subscribe(this); packages = new ConcurrentDictionary <uint, Awaiter>(); logger = (TypeContainer.GetOrNull <ILogger>() ?? NullLogger.Default).As(typeof(NetworkPersistenceManager)); awaiterPool = TypeContainer.Get <IPool <Awaiter> >(); packagePool = TypeContainer.Get <PackagePool>(); }
public NetworkUpdateManager(Client client, IUpdateHub updateHub) { this.client = client; this.updateHub = updateHub; logger = (TypeContainer.GetOrNull <ILogger>() ?? NullLogger.Default).As(typeof(NetworkUpdateManager)); entityNotificationPool = TypeContainer.Get <IPool <EntityNotification> >(); blockChangedNotificationPool = TypeContainer.Get <IPool <BlockChangedNotification> >(); blocksChangedNotificationPool = TypeContainer.Get <IPool <BlocksChangedNotification> >(); packagePool = TypeContainer.Get <PackagePool>(); hubSubscription = updateHub.Subscribe(this, DefaultChannels.Network); clientSubscription = client.Subscribe(this); }
public void Return(ref Package pkg) { PackagePool.Return(ref pkg); }
public ConnectedClient(Socket socket) : base(socket) { packagePool = TypeContainer.Get <PackagePool>(); }