當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。