node.native icon indicating copy to clipboard operation
node.native copied to clipboard

Keep-Alive support

Open sebjameswml opened this issue 11 years ago • 3 comments

I want to implement Keep-Alive support in node.native.

I can easily enough set a response to tell the client that the connection should be kept alive.

What I'm having a problem with is executing a callback when a second request comes from the client on the kept-alive connection.

In node.js and luvit, they have an on:data callback. I can't find this event in libuv, so I'm really asking you all if you know if node.js/luvit implement additional events beyond those which libuv provides.

sebjameswml avatar Nov 25 '13 14:11 sebjameswml

native/events.h is the definition of various callbacks in node.native. So I need to add an dev:ev::data callback to the http classes to make my Keep-Alive support work.

sebjameswml avatar Nov 25 '13 14:11 sebjameswml

See sebjameswml/node.native for the keepalive support; commit c5c93980b8df699804f88db34e9f82566db7bf7c

This adds keepaliveserver.cpp and keepaliveclient.cpp, along with changes in http.h.

sebjameswml avatar Nov 28 '13 11:11 sebjameswml

@dennycd Do you want me to pull-request these changes?

sebjameswml avatar Nov 28 '13 11:11 sebjameswml