Пример #1
0
        public async void Dispose()
        {
            connection.MessageReceived -= OnMessageReceived;
            connection.Dispose();

            session.Peer.LocalSdpReadytoSend     -= SendSdpMessage;
            session.Peer.IceCandidateReadytoSend -= SendIceCandidateMessage;

            session.Peer.RenegotiationNeeded -= OnRenegotiate;
            session.Peer.Connected           -= OnPeerConnected;
            session.PostShutdown             -= OnPostShutdown;
            session.Initialized -= OnPeerConnectionInitialized;
            session.Dispose();

            await ShutdownConnectionAsync();

            service.Unregister(this);
        }
Пример #2
0
 protected override void OnError(ErrorEventArgs e)
 {
     Util.WriteLine($"WebSocketSignaller.Error {e.Message}");
     session.Dispose();
     Dispose();
 }