Ejemplo n.º 1
0
 /// =============================================================================================
 /// <summary>
 /// WebSocket切断
 /// </summary>
 public void Close()
 {
     if (WebuSocket == null)
     {
         ConnectStatus = eConnectStatus.Disconnected;
         return;
     }
     WebuSocket.Disconnect();
     WebuSocket = null;
 }
Ejemplo n.º 2
0
    private bool disposedValue = false; // To detect redundant calls

    protected virtual void Dispose(bool disposing)
    {
        if (!disposedValue)
        {
            if (disposing)
            {
                // 切断を行う
                ws?.Disconnect();
                Channels.Close <OnUpdatePayload>();
            }

            // free unmanaged resources (unmanaged objects) and override a finalizer below.
            // set large fields to null.

            disposedValue = true;
        }
    }
Ejemplo n.º 3
0
 public void OnApplicationQuit()
 {
     webuSocket.Disconnect(true);
 }