Giter Club home page Giter Club logo

Comments (1)

stewrtrs avatar stewrtrs commented on July 17, 2024

The rwnd is something that is controlled by the actual SCTP implementation. You are
correct in that if a application stops reading (calling recv) then the implementation
will buffer up to the rwnd bytes of data (waiting for the user to read it) and then finally
start to send a rwnd of 0. From the time you stop calling recv() to the time it stops
would vary depending on how much data the peer was sending you since the peer
must fill the rwnd before the rwnd == 0 condition would occur.

The callback API has no way to stop since it has already performed the read for you and
is handing you the data.

In some past implementation’s of such an API I have heard where folks would have the
callback not include the data, but instead say “You have data to read” and then you would
have to do a recv() call to acquire the data. Since it was not implemented that way then
I don’t think you can do anything to stop the data with current mechanisms.

You could, of course, always create an application to application message that says “Stop please
don’t send me data”. As long as your peer honored that then you would not receive more..
That is probably your only choice with the callback API.

Best wishes

R
On Jul 22, 2015, at 7:33 AM, Jianfeng Zhang [email protected] wrote:

I want to prevent the peer from writing more data to this socket. According to RFC4960 I need to tell the peer that my rwnd is 0.
I can stop calling recv() when in non-callback mode. But when using a callback, I can't stop the calling of the callback. Are there any APIs can help?


Reply to this email directly or view it on GitHub.


Randall Stewart
[email protected]
803-317-4952

from usrsctp.

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.