GithubHelp home page GithubHelp logo

torstenrobitzki / sioux Goto Github PK

View Code? Open in Web Editor NEW
20.0 20.0 8.0 1.77 MB

C++ Comet web server with bindings to C++ and Ruby / Rack

License: MIT License

Ruby 2.11% HTML 4.31% C 0.11% C++ 78.34% JavaScript 10.43% CoffeeScript 3.17% CSS 0.65% NASL 0.22% SuperCollider 0.66%

sioux's People

Contributors

dependabot[bot] avatar langley avatar lgtm-migrator avatar torstenrobitzki avatar xtroce avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sioux's Issues

Single Target for all Tests

provide a single rake target which runs all unit tests with all flavors (or at least debug/release). Additional target for all component tests, and for unit tests and component tests.

async_write_some(...) fails when output callback is set and 0 bytes are sent

This isn't a biggie but when calling boost::asio::async_write() with the test socket and a buffer of 0 bytes while having set an output callback this code fails:

if ( !output_callback_.empty() )
    output_callback_( boost::asio::buffer( &output_[ output_.size() - size ], size ) );

( It is part of void socket<Iterator, Timer, Trait>::impl::undelayed_async_write_some. )

As size == 0,

output_[ output_.size() - size ] 

is out of bounds.

One might of cause reason that one shouldn't call async_write_some(...) with a 0 length buffer but it is always nice to not have it crash.

CMake support

Add a rake task, to create a CMake makefille to build all libraries, examples and tests. The rake task should use the information provided to rake by the current build system.

json::delta() runs in close to O(n2) if array elements are large

If two arrays are compared and the elements of the arrays are large (40 bytes), the A* algorithm evaluates a lot of delete operations. This delete operations are very cheap (operation code + index) compared with a previous applies update, insert or edit operation of one array element (larger than 40 bytes).

The used heuristic doesn't add much to push the algorithm faster than dijkstra towards a solution, as it just estimates very small amounts for differences in the length of the arrays.

assert in bayeux.cpp

during rack_test:
Assertion failed: (pos != index_.end()), function idle_session, file /Users/todi/sioux/source/bayeux/bayeux.cpp, line 95.

async_read_until returns before delimiter is found, but no error

Hi,

I've been playing around with your test socket class and I found that if it is used with Asio's async_read_until(), it will cause Asio to call the handler before the actual delimiter is found even though there is no delimiter in the data.

What happens is that Asio will repeatedly call undelayed_async_read_some() on the test socket and when the data is exhaused you will post an** ec(boost::system::errc::success)** and size(0) to the io_service queue. This will cause Asio to stop reading and call the handler because size==0. But since there is no error, the handler is called as if everything is OK and a delimiter was found.

Am I doing something wrong or should your undelayed_async_read_some() either not post a result or post an error when the test data is exhaused?

Thanks for letting us use this test code.

Cheers,

Tim

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.