Git Product home page Git Product logo

Comments (5)

wangpeng1 avatar wangpeng1 commented on August 15, 2024

Sometimes when i call send()method it give me: java.net.SocketTimeoutException: Connection setup failure: socket closed during operation.

from srtdroid.

ThibaultBee avatar ThibaultBee commented on August 15, 2024

Hi,
Could you share how you use send() (with the ByteBuffer or the ByteArray)?

About the second exception, it is explicit: the socket has been closed.

from srtdroid.

wangpeng1 avatar wangpeng1 commented on August 15, 2024

Hi,
in my java android project ,when,i used send(ByteBuffer) it give me java.net.SocketTimeoutException: Connection setup failure: socket closed during operation.
when i used send(ByteBuffer.array()) it give me Operation not supported: Incorrect use of Message API (sendmsg/recvmsg).

when i used srtSocket.getOutputStream(null).write(buffer.array()); it is ok.

but in your kotlin project,all is ok.

from srtdroid.

wangpeng1 avatar wangpeng1 commented on August 15, 2024

when i call send() method,then the socket been closed. Not socket been closed ,then call send() mistake. I test many times,and also see the server.

from srtdroid.

ThibaultBee avatar ThibaultBee commented on August 15, 2024

So, you don't face the first issue anymore?

I believe the only issue you face is that you are trying to use message API with an incorrect size of buffer. Either:

  • use a buffer with the correct size
  • use stream API
    Please refer to the SRT documentation for more info.

from srtdroid.

Related Issues (18)

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.