public ClientConnectEvents(IStar star, StarDbContext db, IStarEventManager evtManager) { _star = star; _db = db; evtManager.RegisterPacketEvent<IClientConnectPacket>(OnClientConnect); }
public AccountsPlugin( ILogger<AccountsPlugin> logger, IStarEventManager evtManager, StarCommandManager cmdManager, ClientConnectEvents connectEvents, AccountCommands accountCommands, AdminAccountCommands adminCommands ) { _logger = logger; _eventManager = evtManager; _commandManager = cmdManager; _connectEvents = connectEvents; _accountCommands = accountCommands; _adminCommands = adminCommands; }
public StarProxy(IStarServer server, IConfiguration config, IPacketTypeCollection packetTypes, ILogger<StarProxy> logger, IStarEventManager evtManager, SocketAsyncEventArgsPool socketPool, Socket clientSocket) { if (clientSocket == null) throw new ArgumentNullException(nameof(clientSocket)); Server = server; ClientPacketProcessor = new PacketProcessor(packetTypes); ServerPacketProcessor = new PacketProcessor(packetTypes); ClientSocket = clientSocket; _logger = logger; _eventManager = evtManager; _isDisposed = false; _isAlive = 0; _socketArgsPool = socketPool; _cancelToken = new CancellationTokenSource(); _clientSem = new SemaphoreSlim(1); _serverSem = new SemaphoreSlim(1); _packetBacklog = new BlockingCollection<PacketBacklogItem>(new ConcurrentQueue<PacketBacklogItem>()); _remoteEndPoint = new IPEndPoint(Dns.GetHostAddressesAsync(config["SBHost"]).Result.First(), int.Parse(config["SBPort"])); }
public CommandsPlugin(IStar star, ILogger<CommandsPlugin> logger, IStarEventManager evtManager) { _star = star; _logger = logger; _eventManager = evtManager; }