Git Product home page Git Product logo

hellepoll's People

Contributors

williame avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hellepoll's Issues

chunked encoding output isn't working

Chrome throws an error if out_encoding_chunked isn't set to false all the time.
The same thing happens with curl.

This is what happens with and without the Content Length.

Can not build on OS X, epoll not supported

Hey.

I just wanted to report that epoll is not supported under OS X:
http://stackoverflow.com/questions/13856413/does-os-x-not-support-epoll-function

I figured when I got the compiler error, about the file not being found

 $ make
g++ -g3 -Wall  -O0   -c helloworld.cpp -MD -MF helloworld.dep -o helloworld.opp
In file included from helloworld.cpp:5:
In file included from ./listener.hpp:7:
./task.hpp:13:10: fatal error: 'sys/epoll.h' file not found
#include <sys/epoll.h>
         ^
1 error generated.
make: *** [helloworld.opp] Error 1

Kind regards :3

not enough FDs

this is really promising a simple solution. its right up there with nginx in terms of speed. in fact, a touch faster given its simplicity.

the following output came out a few times. unsure of the exact correlation with clients, number of clients, etc.

Listener[HTTP@42042] end of stream

This following output came out continuously when load testing with over 1,000 clients

Listener[HTTP@42042] internal error: not enough FDs

this seems more likely the listen queue (backlog) since helloworld isnt reading a file..

Changed
Listener::create(scheduler,"HTTP",port,HelloWorld::factory,100,true);

to
Listener::create(scheduler,"HTTP",port,HelloWorld::factory,100,true);

unfortunately with the same results.

im thinking it might be sysctl configurations.

http overflow

void HttpServerConnection::writef(const char* fmt,...) {
va_list ap;
va_start(ap,fmt);
char buf[1024];
int len = vsnprintf(buf,sizeof(buf),fmt,ap);
if(!len) return;
check(len);
if(len == sizeof(buf)) { // overflowed?
char* s;
len = vasprintf(&s,fmt,ap);
check(len);
write(s,len);
} else
write(buf,len);
va_end(ap);
}

This will overflow due lack of boundary check
you'd want to change this line if(!len) return;
to if(!len || len >= sizeof(buf) return;
and change this if(len == sizeof(buf))
to if(len) {...}

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.