Fraunhofer-IIS / libjapi

libjapi is a universal JSON to C API library. It receives newline-delimited JSON (NDJSON) messages via TCP and calls registered C functions. A JSON response is returned for each request. Furthermore, it is also possible to create push services, which asynchronously push JSON messages to the clients subscribed to them.
MIT License
3 stars 1 forks source link

allow just one connection #22

Closed fraunhofer-iis-bot closed 1 year ago

fraunhofer-iis-bot commented 5 years ago

In GitLab by @hte on Sep 24, 2019, 17:11

It would be good if you can configure the libjapi so that just one connection is allowed (like it was in v1). Then we could detect in our GUI if already someone is connected to the board and it cannot happen that two peaple are working on the same board (could lead to errors).

fraunhofer-iis-bot commented 5 years ago

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

Steps:

fraunhofer-iis-bot commented 5 years ago

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

MR !41

fraunhofer-iis-bot commented 5 years ago

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);

fraunhofer-iis-bot commented 5 years ago

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

closed