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.extendhttp://groups.google.com/group/nodejs/browse_thread/thread/f9ac83e5c11e7e87
Solution is to manually add Attach() to OnConnection.
For client side it seems there is no Detach() being called after NS
resolution? Otherwise I would have removed it. That was another bug.
Note: We don't want to modify evnet's behavior to have on_connect called
directly when the socket is accepted. evnet needs to support SSL, and
on_connect is supposed to signal that the SSL connection is established. The
point here is that being "connected" and being "attached" to the event loop
are two different things. SSL stuff may be transmitted when a socket is not
"connected" but it must always be attached.