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

10 Commits

Author SHA1 Message Date
Ryan Dahl
8185e1fd25 Remove include() add node.mixin()
include() should not be used by libraries because it will pollute the global
namespace. To discourage this behavior and bring Node more in-line with
the current CommonJS module system, include() is removed.

Small scripts like unit tests often times do want to pollute the global
namespace for ease. To avoid the boiler plate code of

  var x = require("/x.js");
  var foo = x.foo;
  var bar = x.bar;

The function node.mixin() is stolen from jQuery's jQuery.extend. So that it
can be written:

  node.mixin(require("/x.js"));

Reference:
http://docs.jquery.com/Utilities/jQuery.extend
http://groups.google.com/group/nodejs/browse_thread/thread/f9ac83e5c11e7e87
2009-10-05 15:46:31 +02:00
Ryan Dahl
095470854b Move tcp library to /tcp.js 2009-09-28 18:48:18 +02:00
Ryan Dahl
4b8f503fac Move mjsunit.js to system module directory. 2009-09-20 18:19:33 +02:00
Ryan
116f4dea05 lint 2009-08-26 22:14:45 +02:00
Ryan
723c7d9f7c Replace onExit() with process.addListener("exit")
- Update documentation.

- Depreciation message for onExit().
2009-08-26 22:14:44 +02:00
Ryan
31265be4a6 Depreciate onLoad 2009-08-26 22:14:44 +02:00
Ryan
368ea93bfe Upgrade evcom - fix API issues. 2009-08-19 17:41:32 +02:00
Ryan
7aaab320b3 API: tcp.Connection "disconnect" event renamed to "close".
More semantic, since the event will be emitted on connection error,
when the connection was ever established.
2009-08-14 12:51:46 +02:00
Ryan
041af82b8c Bugfix: Sockets not properly reattached if reconnected during disconnect event.
The problem was that Connection::on_close was calling Detach() directly
after executing the "disconnect" event. Since we had a boolean attach count,
this was leaving sockets detached even if they had reattached in during the
event.

 * Added many asserts in http.cc and net.cc to ensure that sockets are
   connected when they should be.

 * Changed ObjectWrap to use a reference count instead of boolean attached_
   value.

 * Fixed similar bug in Timer.
2009-07-13 16:38:55 +02:00
Ryan
7879e7fd25 small cleanups 2009-06-30 13:58:30 +02:00