Coder Social home page Coder Social logo

Comments (4)

ojw28 avatar ojw28 commented on July 20, 2024 1

One option would be to make an RtmpIOException, like:

class RtmpIOException extends IOException {

    public final static int OPEN_ALLOC = -1;
    public final static int OPEN_SETUP_URL = -2;
    public final static int OPEN_CONNECT = -3;
    public final static int OPEN_CONNECT_STREAM = -4;

    public final int errorCode;

    public RtmpIOException(int errorCode) {
      this.errorCode = errorCode;
    }

  }

Then you could both throw and make it easy for the caller to retrieve the error code (if open is defined to throw RtmpIOException specifically).

from librtmp-client-for-android.

mekya avatar mekya commented on July 20, 2024

Yeah you are right, read function throws exception if connection to server is lost somehow. Check the commit referenced above. Also check the #31 issue.

Returning different values for open function makes easy to debug the problem, nevertheless yeah I may implement to make the open function throw IOException in any failure.

from librtmp-client-for-android.

mekya avatar mekya commented on July 20, 2024

Check it out 4afe5ce

from librtmp-client-for-android.

ojw28 avatar ojw28 commented on July 20, 2024

Cool! Thanks. I posted a couple of notes on the change.

from librtmp-client-for-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.