Coder Social home page Coder Social logo

Comments (5)

llu94 avatar llu94 commented on June 3, 2024 1

AIUI /echo only has like 5 flags rn; I think we should add a new feature flag. We could call it break or something. I can put in a PR with a tentative name and we can slowly discuss a name for the API.

from fortio.

ldemailly avatar ldemailly commented on June 3, 2024

Just to be sure: you mean you want an option to just error out/close the connection without even an HTTP code reply? but as a percentage? there is a "closing server" already used for some test but that one is not conditional

We could indeed add a close-before - the thing though is that the incoming request has to be parsed to figure that out, so that may not simulate what you're actually after? (if you wanted to close before even reading anything)

from fortio.

llu94 avatar llu94 commented on June 3, 2024

@ldemailly the use case we'd like to simulate is no response being sent. We're okay if the request is parsed but we'd like for the socket to close before the response is sent out.

from fortio.

llu94 avatar llu94 commented on June 3, 2024

@ldemailly I'm game to add a close-before option if you have any guidelines or requests or ideas on how to implement it.

from fortio.

ldemailly avatar ldemailly commented on June 3, 2024

I'm game to add a close-before option if you have any guidelines or requests or ideas on how to implement it.

Sure, thanks. question is whether it's a variant on close= maybe it could be

close=true 
close=5.3

remains the current behavior
and then

close=first
close=-5.3

for close first 100% or 5.3% respectively

or a new option entirely that can be composed so you'd close after in some % and close before in some other %

not sure... what's the best api vs complexity/too man flags and options

from fortio.

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.