GithubHelp home page GithubHelp logo

Comments (4)

fraunhofer-iis-bot avatar fraunhofer-iis-bot commented on June 23, 2024

In GitLab by @cstender on Oct 17, 2019, 14:13

Steps:

  • extend the japi_context by two new variables: uint16_t num_clients and uint16_t max_clients
  • set num_clients = 0; and max_clients = 0 in japi_init()
  • implement a new function called japi_set_max_allowed_clients(uint16_t num)
    • copy num to japi_context->max_clients
    • 0 means no client limit
    • otherwise the number passed to the function is used as the maximum number of allowed clients
  • extend function japi_add_client() to increase japi->num_clients whenever a client is added
  • extend function japu_remove_client() to decrease japu->num_clients whenever a client re moved
  • extend function japi_start_server to check if max_clients was reached
    • at the end of the function new client connections are handled
    • before a new client is added make sure that there are still more clients allowed

from libjapi.

fraunhofer-iis-bot avatar fraunhofer-iis-bot commented on June 23, 2024

In GitLab by @fraunhofer-iis-anon on Oct 17, 2019, 15:52

MR !41

from libjapi.

fraunhofer-iis-bot avatar fraunhofer-iis-bot commented on June 23, 2024

In GitLab by @cstender on Oct 17, 2019, 16:41

Implemented in dev branch.

Just set the maximum number of clients before calling japi_start_server(...), e.g.

japi_set_max_allowed_clients(ctx, 1);

from libjapi.

fraunhofer-iis-bot avatar fraunhofer-iis-bot commented on June 23, 2024

In GitLab by @cstender on Oct 17, 2019, 16:41

closed

from libjapi.

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.