Class GameListener<TConnectionFactory>
Class that extends the standard BaseListener for a game listener.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Fibula.Communications.Listeners
Assembly: Fibula.Communications.dll
Syntax
public class GameListener<TConnectionFactory> : BaseListener, IListener, IHostedService where TConnectionFactory : class, ISocketConnectionFactory
Type Parameters
Name | Description |
---|---|
TConnectionFactory | The type of connection factory to use in the listener. |
Constructors
| Improve this Doc View SourceGameListener(ILogger, IOptions<GameListenerOptions>, TConnectionFactory, IDoSDefender)
Initializes a new instance of the GameListener<TConnectionFactory> class.
Declaration
public GameListener(ILogger logger, IOptions<GameListenerOptions> options, TConnectionFactory connectionFactory, IDoSDefender dosDefender)
Parameters
Type | Name | Description |
---|---|---|
Serilog.ILogger | logger | A reference to the logger in use. |
Microsoft.Extensions.Options.IOptions<GameListenerOptions> | options | The options for this listener. |
TConnectionFactory | connectionFactory | A reference to the connection factory in play here. |
IDoSDefender | dosDefender | A reference to the DoS defender service implementation. |
GameListener(ILogger, IOptions<GameListenerOptions>, TConnectionFactory, IDoSDefender, ITcpListener)
Initializes a new instance of the GameListener<TConnectionFactory> class.
Declaration
public GameListener(ILogger logger, IOptions<GameListenerOptions> options, TConnectionFactory connectionFactory, IDoSDefender dosDefender, ITcpListener tcpListener)
Parameters
Type | Name | Description |
---|---|---|
Serilog.ILogger | logger | A reference to the logger in use. |
Microsoft.Extensions.Options.IOptions<GameListenerOptions> | options | The options for this listener. |
TConnectionFactory | connectionFactory | A reference to the connection factory in play here. |
IDoSDefender | dosDefender | A reference to the DoS defender service implementation. |
ITcpListener | tcpListener | Optional. An intance to use as the TCP listener, useful for unit testing. |
Implements
Microsoft.Extensions.Hosting.IHostedService