Пример #1
0
 public MessageChannelHandler(IMessageHandler customizeHandler, IMessageFactory messageFactory, IConnectionChannelGroup group, ILogger <MessageChannelHandler> logger)
 {
     this.messageHandler = customizeHandler;
     this.messageFactory = messageFactory;
     this.channelGroup   = group;
     this.logger         = logger;
 }
Пример #2
0
 public KcpUpdateHandler(IChannel channel, IConnectionChannelGroup group, IMessageFactory messageFactory, IOptions <KcpOptions> options, ILogger <KcpUpdateHandler> logger)
 {
     this.options        = options.Value;
     this.recbuf         = new byte[this.options.MAX_RECBUFF_LEN];
     this.channel        = channel as UdpSocketDatagramChannel;
     this.messageFactory = messageFactory;
     this.logger         = logger;
     this.Start((uint)group.FindClientID(channel));
 }
 public TcpChannelGroupHandler(IConnectionChannelGroup group, ServerOptions Options)
 {
     channelGroup  = group;
     this._options = Options;
 }
Пример #4
0
 public DefaultMessageHandler(IConnectionChannelGroup group, IServiceProvider provider, ILogger <DefaultMessageHandler> logger)
 {
     this.channelGroup    = group;
     this.logger          = logger;
     this.serviceprovider = provider;
 }
Пример #5
0
 public WebSocketClientHandler(IConnectionChannelGroup group, ServerOptions Options)
 {
     this.channelGroup = group;
     this.Options      = Options;
 }
Пример #6
0
 public HttpClientHandler(IMessageFactory messageFactory, IConnectionChannelGroup group, ServerOptions Options)
 {
     this.channelGroup   = group;
     this.messageFactory = messageFactory;
     this.Options        = Options;
 }
Пример #7
0
 public SecurityChannelHandler(IConnectionChannelGroup group, IOptions <SecurityOptions> options)
 {
     this.channelGroup = group;
     this.options      = options.Value;
     this.blowFish     = new BlowFish(this.options.Key);
 }
Пример #8
0
 public UdpChannelGroupHandler(IConnectionChannelGroup group, IMessageFactory messageFactory, ServerOptions Options)
 {
     this.channelGroup   = group;
     this.messageFactory = messageFactory;
     this._options       = Options;
 }
 public static int FindClientID(this IConnectionChannelGroup group, IChannel channel)
 {
     return(group.FindConnectionInfo(channel.Id).ClientId);
 }
 public static ConnectionInfo FindConnectionInfo(this IConnectionChannelGroup group, IChannel channel)
 {
     return(group.FindConnectionInfo(channel.Id));
 }