Commit Graph

3351 Commits (81cbd42cf51902083148a575d3a52cae2851732b)

Author SHA1 Message Date
Michael Carter 8ea6adcae6 Feature: add node.cwd() to access the current working directory. 2009-09-01 11:39:30 +02:00
Ryan fbf65b58f9 Use Error exceptions where possible in net.cc and file.cc 2009-08-31 18:57:01 +02:00
Ryan 3862fdade4 Throw Error exceptions from node.dlopen() 2009-08-31 18:48:47 +02:00
Ryan afd9e714d3 Stack traces for mjsunit errors, better error reporting function.
The error reporting function tries to look at the "stack" element of the
exception.
2009-08-31 18:42:50 +02:00
Ryan 7beea2cd5f Upgrade evcom; Add setTimeout method to node.tcp.Connection
The default timeout is 60 seconds, but it can now be changed.

evcom upgrade includes fixes to force_close.
2009-08-31 18:26:50 +02:00
Ryan 18a1923604 Update test script to use new debug build's name: node_g 2009-08-31 16:12:27 +02:00
Ryan a97dce7523 Build static executable.
- Fix a few errors with node.dlopen()

- Report errors to stderr (this should probably be a separate commit, but
  whatever)
2009-08-31 11:45:44 +02:00
Ryan b73264d9b3 Add command line arguments for accessing build flags.
node --cflags
node --libs

At the expense of some WAF nastiness.
2009-08-27 16:08:47 +02:00
Ryan 4d92199d18 Add pkgconfig files to help with dll builds. 2009-08-27 16:08:47 +02:00
Ryan 2b6d72431b First attempt at node.dlopen
Compiled first working 'hello world' module with this config
2009-08-27 16:08:40 +02:00
Ryan 31db4f1ed8 bump version 2009-08-27 12:31:52 +02:00
Ryan 00a03dfee2 Fix text on index.html 2009-08-27 12:23:53 +02:00
Ryan ad9d683f9f API: rename node.Process to node.ChildProcess
This is to avoid confusion with the global "process" object, especially for
the instances of node.Process.
2009-08-26 22:36:45 +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 6025da2153 Introduce 'process' object. Also is the global object. 2009-08-26 22:14:44 +02:00
Ryan 31265be4a6 Depreciate onLoad 2009-08-26 22:14:44 +02:00
Ryan 79f121044c Synchronous module loading.
`include` and `require now` call `promise.wait` on their retrieval functions
making them synchronous.  Introduce `include_async` and `require_async` to
do asynchronous retrievals.

`include_async` and `require_async` need testing and documentation.

Update documentation for include, require().  I am mostly removing
information about onLoad(). onLoad is to be depreciated.
2009-08-26 22:14:01 +02:00
Ryan 7e7deed510 Add node.assert for internal debugging. 2009-08-26 18:02:13 +02:00
Ryan 18d0511777 promise.block() renamed to promise.wait()
promise.wait() now returns the arguments of the "success" event.  If there
was only a single argument, then it is returned.  If there was more than
one, they are returned as an array.  If there was an error, it is thrown.
See documentation.
2009-08-26 17:28:49 +02:00
Ryan 51addf19d8 Improve Promise documentation. 2009-08-26 11:25:53 +02:00
Ryan 8781b969e9 Modify website layout. 2009-08-26 11:25:10 +02:00
Ryan db42ad959d API: All EventEmitters emit "newListener" when listeners are added.
The "newListener" event will also be emitted for listeners to "newListener".
Maybe useful?
2009-08-25 17:28:06 +02:00
Ryan b5a1585470 Restyle website/api.html. Now looks like the front page.
Made a few other little corrections too.
2009-08-25 17:25:39 +02:00
Ryan b5b65ddcd7 Upgrade v8 to 1.3.7 2009-08-25 13:47:18 +02:00
Ryan b0a362a727 Fix coupling problems on OSX 2009-08-25 13:33:19 +02:00
Ryan aa664c8040 Add close() to coupling pump. Wasn't getting EOF. 2009-08-25 12:56:54 +02:00
Ryan 19f182a39f Experimental support for Promise.block() 2009-08-25 04:25:35 +02:00
Ryan 82cb1b5acb API: Remove buffered file object (node.File)
With the addition of non-libeio stdio (17c6a67f15)
this class is no longer being used internally. It has proved buggy and isn't
full-featured enough to be very useful.  Since it's implemented entirely in
javascript it will be easy for someone to extra into their own library if
needed.
2009-08-25 01:18:44 +02:00
Ryan 8658999c7d Refactor node.Process to take advantage of evcom_reader/writer. 2009-08-25 01:06:49 +02:00
Ryan 17c6a67f15 Introduce node.stdio
Remove old stdout, stderr, stdin objects.
2009-08-24 21:20:26 +02:00
Ryan 0727fcc9ed Speed up test-tcp-throttle.js 2009-08-24 21:11:02 +02:00
Ryan 69a9f66b07 Add sha1 hashes to ChangeLog 2009-08-24 13:02:55 +02:00
Ryan 4fab9dfc36 Remove outdated todo list 2009-08-24 13:00:45 +02:00
Ryan 1bbd5c6d55 Add node node_g to gitignore. 2009-08-24 12:59:17 +02:00
Ryan 316e2833f0 Use flat object instead of array-of-arrays for HTTP headers.
E.G. { "Content-Length": 10, "Content-Type": "text/html" } instead of
[["Content-Length", 10], ["Content-Type", "text/html"]].
The main reason for this change is object-creation efficiency.

This still needs testing and some further changes (like when receiving
multiple header lines with the same field-name, they are concatenated with a
comma but some headers ("Content-Length") should not be concatenated ; the
new header line should replace the old value).

Various thoughts on this subject:
http://groups.google.com/group/nodejs/browse_thread/thread/9a67bb32706d9efc#
http://four.livejournal.com/979640.html
http://mail.gnome.org/archives/libsoup-list/2009-March/msg00015.html
2009-08-23 12:32:49 +02:00
Ryan 9c97b1db30 bump version 2009-08-22 13:07:31 +02:00
Ryan a8813fcdf5 evcom upgrade - ignore sigpipe. remove error output. 2009-08-22 12:04:45 +02:00
Ryan a73998d6f4 bump version 2009-08-21 18:03:15 +02:00
Kevin van Zonneveld 8489bdbaeb Buggy connections could crash node.js. Now check connection before sending data every time
http://groups.google.com/group/nodejs/browse_thread/thread/16abfa87c32408f3

We have our node.js server monitored by monit, however it seems monit is pretty
agressive / quick about closing its connection and thus we've gotten into a
loop of errors like this:

    at #<a ServerResponse>.flush
    at #<a ServerResponse>.sendBody
    at [object Object].json
    at [object Object].[anonymous]
    at [object Object].[anonymous]
    at [object Object].[anonymous]
http.js:353: Socket is not open for writing
      connection.send(out, out.encoding);
                 ^

Below is a patch that basically cause flushMessageQueue to check the connection
state for each item in the queue rather than just a single time in the
beginning.
2009-08-21 17:54:10 +02:00
Ryan ed3602dddc Sync evcom 2009-08-21 14:53:58 +02:00
Ryan f7f11352b7 Don't Close TCP Connection/Server on destruction.
If the connection is open when the destructor is called it's a bug! Don't
want to try to compensate for bugs.
2009-08-21 14:47:33 +02:00
Ryan 048a1b8b9e Upgrade v8 to 1.3.6 2009-08-21 13:13:04 +02:00
Ryan 90ac9ab078 Remove connnection.fullClose() from documentation.
This function was removed in 368ea93bfe.
2009-08-19 17:46:44 +02:00
Ryan 368ea93bfe Upgrade evcom - fix API issues. 2009-08-19 17:41:32 +02:00
Ryan 0cec74d03d Upgrade v8 to 1.3.5 2009-08-19 16:37:15 +02:00
Ryan b590a45849 Return the EventEmitter from addListener for chaining.
http://groups.google.com/group/nodejs/browse_thread/thread/13708eacedb40b36
2009-08-19 13:29:22 +02:00
Abe Fettig 53b3d6be35 Bugfix: stdin fd (0) being ignored by node.File.
In the case of stdin options.fd is 0, which is considered false, therefore fd
gets set to null intead of 0.
http://groups.google.com/group/nodejs/msg/80849f6aa0b0eaa0
2009-08-19 12:58:02 +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 95f9209966 Clarify some of the TCP API documentation. 2009-08-14 12:43:46 +02:00