PeerCastStation.FLV.RTMP.RTMPSourceConnection.DoProcess C# (CSharp) Method

DoProcess() protected method

protected DoProcess ( CancellationToken cancellationToken ) : Task
cancellationToken System.Threading.CancellationToken
return Task
    protected override async Task DoProcess(CancellationToken cancellationToken)
    {
      this.state = ConnectionState.Waiting;
      try {
        await Handshake(cancellationToken);
        await ProcessRTMPMessages(cancellationToken);
        this.state = ConnectionState.Closed;
      }
      catch (BindErrorException e) {
        Logger.Error(e);
        Stop(StopReason.NoHost);
        this.state = ConnectionState.Error;
      }
      catch (IOException e) {
        Logger.Error(e);
        Stop(StopReason.ConnectionError);
        this.state = ConnectionState.Error;
      }
      catch (ConnectionStoppedExcception) {
        this.state = ConnectionState.Closed;
      }
    }