0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
Commit Graph

6 Commits

Author SHA1 Message Date
Ryan
70fe920fb5 Use events for all HTTP messages.
This is a rather large refactor! Mostly for the better side. I've had to
remove some functionality like req.interrupt(). A lot of other work is left
messy or incomplete.
2009-06-28 19:08:26 +02:00
Ryan
ed3d6a63d5 Further expand EventEmitter to TCP and HTTP
The constructor for TCP servers can no longer take a connection handler for
purely technical reasons. (The constructor for EventEmitter is implemented
in C++ but addListener is in javascript, and I don't want to make too many
C++ -> Javascript references.) Thus I introduce new constructor methods to
ease the creation of the servers:

  node.tcp.createServer()
  node.http.createServer()

These work almost the same as the old constructors.

In general we're working towards a future where no constructors are
publicly exposed or take arguments.

The HTTP events like "on_uri" are not yet using the event interface.
onMessage still is a constructor - but this will change soon.
2009-06-28 19:08:26 +02:00
Ryan
5b7fb1003c Add failing test. Process spawning loop.
I think this is the issue Felix Geisendoerfer is reporting:
http://groups.google.com/group/nodejs/browse_thread/thread/efbae1ec1e67786c
2009-06-27 00:11:20 +02:00
Ryan
bdad5e7333 test-process-kill: start process after onLoad 2009-06-24 13:58:17 +02:00
Ryan
7363ccd273 bugfix: Properly exit a process.
This requires that onExit() is not called immediately upon receiving a
SIGCHLD. There could still be data in the pipez. So, instead just set a
flag and invoke the pipe watchers.

Sometimes one will not receive an EOF from pipes because the process was
killed by a SIGTERM, or something. If SIGCHLD has been recved but we are
getting EAGAIN, the pipez need to be closed too.
2009-06-24 13:44:12 +02:00
Ryan
3fed1a0954 Use v8's test runner 2009-06-22 14:08:42 +02:00