protected virtual void AddClient(IActiveClient client)
 {
     lock (ActiveClients)
     {
         ActiveClients.Add(client);
     }
 }
Exemple #2
0
 protected override void AddClient(IActiveClient client)
 {
     client.ClientAuthenticated      += ClientAuthenticated;
     client.ClientAuthenticateFailed += ClientAuthenticaFaild;
     client.ClientDisconnect         += ClientDisconnected;
     client.ClientDecodeFalied       += ClientDecodeFailed;
     client.ClientDecoded            += ClientDecoded;
     base.AddClient(client);
 }
 public override void RemoveClient(IActiveClient client)
 {
     lock (ActiveClients)
     {
         if (ActiveClients.Any(c => c.ClientGuid == client.ClientGuid))
         {
             ActiveClients.Remove(client);
         }
     }
 }
Exemple #4
0
 public ActiveClientEventArgs(IActiveClient sourceClient, Exception exception, string message)
     : this(sourceClient, exception)
 {
     ExceptionMessage = message;
 }
Exemple #5
0
 public ActiveClientEventArgs(IActiveClient sourceClient, Exception exception) : this(sourceClient)
 {
     Exception = exception;
 }
Exemple #6
0
 public ActiveClientEventArgs(IActiveClient sourceClient)
 {
     SourceActiveClient = sourceClient;
 }
 /// <summary>
 /// 触发客户端连接接受事件
 /// </summary>
 /// <param name="client"></param>
 protected virtual void OnClientAccedped(IActiveClient client)
 {
     ClientAccepted?.Invoke(new ActiveClientEventArgs(client));
 }
 public virtual void RemoveClient(IActiveClient client)
 {
     throw new NotImplementedException();
 }
Exemple #9
0
 protected override void OnClientAccedped(IActiveClient client)
 {
     base.OnClientAccedped(client);
     ReportService.Instance.Info($"接收客户端连接请求成功,连接建立成功。客户端地址:{client.ClientAddress}");
 }