当前位置: 首页>>代码示例>>C#>>正文


C# WebSocketSharp.CloseEventArgs类代码示例

本文整理汇总了C#中WebSocketSharp.CloseEventArgs的典型用法代码示例。如果您正苦于以下问题:C# CloseEventArgs类的具体用法?C# CloseEventArgs怎么用?C# CloseEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CloseEventArgs类属于WebSocketSharp命名空间,在下文中一共展示了CloseEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnCloseInternal

 void OnCloseInternal(object sender, CloseEventArgs e)
 {
     if (OnClose != null)
     {
         OnClose(this, e.Reason);
     }
 }
开发者ID:wildbunny,项目名称:c-graphene-api,代码行数:7,代码来源:GrapheneWebsocket.cs

示例2: OnClose

        protected override void OnClose(CloseEventArgs e)
        {
            Program.Users.Remove(User);

            //test
            Program.Chanels.Remove(_test);
        }
开发者ID:pasanzaza,项目名称:Dragonbound,代码行数:7,代码来源:Server.cs

示例3: OnClose

 protected override void OnClose(CloseEventArgs e)
 {
     log_.Info("closed");
     EventHandler<CloseEventArgs> handler = OnCloseEvent;
     if (handler != null)
     {
         handler(this, e);
     }
 }
开发者ID:greggman,项目名称:hft-unity-gamepad,代码行数:9,代码来源:HFTSocket.cs

示例4: OnSocketClose

        void OnSocketClose(object sender, CloseEventArgs e)
        {
            if (_webSocket == null)
            {
                throw new ApplicationException("_webSocket can't be null");
            }

            Log.Write("WARN: RTM websocket closed. Reconnecting in a few seconds...");
            Thread.Sleep(5000);
            ConnectRtm();
        }
开发者ID:seanhussey,项目名称:windows-slack-notifier,代码行数:11,代码来源:RtmConnection.cs

示例5: OnClose

 protected override void OnClose(CloseEventArgs e)
 {
     WSGroupServices.GetLogger().Info("Socket closed");
     foreach (var client in _clients)
     {
         if (!client.Value.IsAlive && DoesFilterMatchIncomingNodeName(client.Key, WSGroupServices.GetFilter()))
         {
             ApplyOnDisconnect(client);
         }
     }
 }
开发者ID:kevoree,项目名称:kevoree-dotnet-group-ws,代码行数:11,代码来源:WSGroupServerWSService.cs

示例6: Client_Close

        private void Client_Close(CloseEventArgs e)
        {
            if (InvokeRequired)
            {
                Invoke((MethodInvoker)delegate {
                    Client_Close(e);
                });
                return;
            }

            status.Text = "Connection closed.";
        }
开发者ID:tewarid,项目名称:NetTools,代码行数:12,代码来源:ClientForm.cs

示例7: OnClose

 protected override void OnClose(CloseEventArgs e)
 {
     Program.Users.Remove(User);
     try
     {
         Channel _chan = Program.Chanels.Single(a => a.UserIn(User) == true);
         if (_chan != null)
         {
             _chan.RemoveUser(User);
         }
     }
     catch { }
 }
开发者ID:JoaquinVautier,项目名称:DragonBound,代码行数:13,代码来源:Server.cs

示例8: OnClose

        protected override void OnClose(CloseEventArgs e) {
            this.isReady = false;

            if (this.onClose != null) {
                this.onClose();
            }

            if (Settings.debug.info) {
                Debug.Log("AirConsole: screen.html disconnected");
            }
           
            base.OnClose(e);
        }
开发者ID:ajgriesemer,项目名称:GameDev,代码行数:13,代码来源:WebsocketListener.cs

示例9: OnClose

		private void OnClose(object sender, CloseEventArgs e)
		{
			EmitEvent("close");
		}
开发者ID:ehackb,项目名称:EHackVisual,代码行数:4,代码来源:SocketIOComponent.cs

示例10: OnClose

 protected override void OnClose(CloseEventArgs e) {
   if(true) {
     X13.Log.Info("{0} Disconnect: [{1}]{2}", this.ToString(), e.Code, e.Reason);
   }
   if(_owner!=null) {
     _owner.Remove();
   }
 }
开发者ID:Wassili-Hense,项目名称:Host.V04f,代码行数:8,代码来源:SIO_Connection.cs

示例11: OnClose

 protected override void OnClose(CloseEventArgs e)
 {
     var msg = String.Format("{0} got logged off...", _name);
       Broadcast(msg);
 }
开发者ID:kallex,项目名称:websocket-sharp,代码行数:5,代码来源:Chat.cs

示例12: OnCloseHandler

 private void OnCloseHandler(object sender, CloseEventArgs e) {
     Debug.Log("WebSocket closed with reason: " + e.Reason);
 }
开发者ID:rjansen,项目名称:unity-ws-demo,代码行数:3,代码来源:Main.cs

示例13: Close

        // As server
        internal void Close(CloseEventArgs args, byte [] frameAsBytes, int waitTimeOut)
        {
            lock (_forClose)
              {
            if (_readyState == WebSocketState.CLOSING || _readyState == WebSocketState.CLOSED)
              return;

            _readyState = WebSocketState.CLOSING;
              }

              args.WasClean = close (frameAsBytes, waitTimeOut, closeServerResources);

              _readyState = WebSocketState.CLOSED;

              OnClose.Emit (this, args);
        }
开发者ID:kevleyski,项目名称:websocket-sharp,代码行数:17,代码来源:WebSocket.cs

示例14: closeAsync

 private void closeAsync (CloseEventArgs e, bool send, bool wait)
 {
   Action<CloseEventArgs, bool, bool> closer = close;
   closer.BeginInvoke (e, send, wait, ar => closer.EndInvoke (ar), null);
 }
开发者ID:greeduomacro,项目名称:uomap-client,代码行数:5,代码来源:WebSocket.cs

示例15: Close

    // As server
    internal void Close (CloseEventArgs e, byte[] frameAsBytes, TimeSpan timeout)
    {
      lock (_forConn) {
        if (_readyState == WebSocketState.Closing) {
          _logger.Info ("The closing is already in progress.");
          return;
        }

        if (_readyState == WebSocketState.Closed) {
          _logger.Info ("The connection has been closed.");
          return;
        }

        _readyState = WebSocketState.Closing;
      }

      e.WasClean = closeHandshake (frameAsBytes, timeout, releaseServerResources);

      _readyState = WebSocketState.Closed;
      try {
        OnClose.Emit (this, e);
      }
      catch (Exception ex) {
        _logger.Fatal (ex.ToString ());
      }
    }
开发者ID:greeduomacro,项目名称:uomap-client,代码行数:27,代码来源:WebSocket.cs


注:本文中的WebSocketSharp.CloseEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。