Git Product home page Git Product logo

websocketsplus's People

Contributors

candycode avatar ugovaretto avatar

Watchers

 avatar  avatar

websocketsplus's Issues

Min size in Put method

When implementing #13 do add the option to specify a minimum size for a data packet should be added to the queue regardless of the done flag.
Use case: receiving large dataset

  1. send begin message
  2. send unformatted byte chunks
  3. send end message

The service receiving the data might decide to write to a temporary file: open file in (1), write data chunks in (2), close and possibly read in (3).

Add cookiejar storage

Add place where to store http cookies.

Open issue: how to handle removal of associated data after cookie expires.

Impelement reusable SessionService class

Currently there is no reusable class to speed up the implementation of services; the SessionService implementation is for testing purposes only and not reusable in its current form.

Do implement a minimal SessionService class that works like the one implemented in the osgcapture example.

Write exception handling

Currently whenever data cannot be sent a standard runtime_error exception is thrown, this forces client code to handle the exception from the outside.
Alternative options include:

  1. create custom exception with additional details:
    • context reference
    • service references
  2. invoke a Service::OnWrite error method and decide if service should be shut down depending on the return value

Currently leaning towards option 1because it's easier to let client code figure out what to do by itself without forcing Service implementations to support error handling

Add html test files

Currently the html code to test basic functionality is stored within comments; add files instead.

Fix logging

Currently only a single logging level is supported, levels are not OR-ed together.

Add support for fragmentation

Always support fragmentation for send.
Optionally support fragmentation in receive mode: allow client code to decide if it wants to simply increase the size of the rx buffer to fit one packet or support fragmented receive.

Change service data access design

Currently services implementing different protocols must all use the same Context::GetServiceData method to access data.
It is therefore not possible to have different services access different data.
Change interface by making GetServiceData dependent on the Service data type and add variadic template list to Context instead of a single service data type:

Context< Service1, Service2... >

Internally data are stored into a tuple: tuple< ArgsT::DataType > data_;

and accessed through: GetServiceData< Service1 >() -> returns reference to Service1::DataType

libwebsockets timer doesn't work

Calling

libwebsocket_service(context_, ms);

Does not result in a min dealy of ms milliseconds between calls, need to handle request/reply throttling manually

Remove STREAM flag

No need for the stream flag: simply have Service::Sending() method always return true.

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.