859 Commits
Author SHA1 Message Date
Ryan Dahl f1a4f17897 script.runIn*Context not throwing errors properly. 2010-06-19 19:31:09 -07:00
Ryan Dahl 9bd3942f70 Add platform_none for cygwin build 2010-06-18 09:46:18 -07:00
Ryan Dahl 84c10265db Fix platform_linux.cc, missing include 2010-06-17 18:36:31 -07:00
Ryan Dahl 01a8d270cf Add platform files, move getmem to node::OS class. 2010-06-17 18:23:43 -07:00
David Siegel 81ad8106dc Add UDP broadcast support 2010-06-16 10:45:16 -07:00
isaacs 73f207fe59 Throw exceptions, not strings 2010-06-16 10:11:08 -07:00
Ryan Dahl c2e2479cc5 Fix Linux build 2010-06-15 20:04:29 -07:00
Peter Dekkers e48f0d1dd9 Fixed incorrect mask for determining fs.Stats types 2010-06-15 19:52:37 -07:00
isaacs 4ce100fa62 A replacement for decodeURIComponent that doesn't throw.
And add a few more tests.
2010-06-15 19:28:09 -07:00
Ryan Dahl 6bed15e074 Refactor: Utf8Decoder -> StringDecoder
Instead of just decoding Utf8, this will proxy requests to buffer.toString()
for other encodings. This makes for a simpler interface.
2010-06-15 18:19:27 -07:00
Ryan Dahl 459440842f More lint on node_crypto 2010-06-15 13:36:01 -07:00
Ryan Dahl 9854216d36 Fix a bunch of memory leaks in node_crypto 2010-06-15 13:31:59 -07:00
Ryan Dahl 5bc00abed7 Lint node_crypto.cc 2010-06-15 13:16:20 -07:00
Ryan Dahl 5f88097eb4 Remove unused code from node_crypto 2010-06-15 12:41:14 -07:00
isaacs 1ffdad010b Expose the FD numbers for stdin and stderr on process.binding("stdio") 2010-06-14 15:10:00 -07:00
Ryan Dahl d6072766ed Fix memory leak in hash.update() 2010-06-14 14:38:40 -07:00
Ryan Dahl 009b4569b3 Merge Hash.init() function into JS constructor 2010-06-14 13:10:23 -07:00
Paul Querna 02da5ed4a1 Implement datagram sockets
- Adds new dgram module, for all data-gram type transports
- Supports both UDP client and servers
- Supports Unix Daemon sockets in DGRAM mode too (think syslog)
- Uses a shared Buffer and slices that as needed to be reasonably
  performant.
- One supplied test program so far, test-dgram-pingpong
- Passes test cases on osx 10.6 and ubuntu 9.10u
2010-06-12 02:41:45 -07:00
isaacs 94be898fbc Remove "uri" module.
The deprecation warning was broken, so clearly no one is using this thing.
2010-06-11 13:19:50 -07:00
Ryan Dahl 0e390d69a8 Don't use bzero 2010-06-10 07:58:24 -07:00
Raffaele Sena b3b81d67ff Port to cygwin 2010-06-09 15:08:46 -07:00
Ryan Dahl bca16a0581 Handle ctrl+z from readline 2010-06-08 17:49:22 -07:00
Ryan Dahl 0c3b6aba7a Do not output \n on stderr on output, breaks tests 2010-06-07 16:23:48 -07:00
Ryan Dahl 6056d2ea2c node without arguments starts the REPL 2010-06-07 16:15:41 -07:00
Ryan Dahl 41f213be18 Add binding to termios, implement readline for repl 2010-06-07 15:24:21 -07:00
Ryan Dahl 9be6c501ec Upgrade http-parser 2010-06-06 17:41:03 -07:00
Ryan Dahl 935f8437fd Allow ObjectWrap destructors before Wrap() 2010-06-04 14:30:59 -07:00
Ryan Dahl 9e8df0e836 More dynamic linking options (again)
Original commit: 75f0cf471a
2010-06-04 11:42:34 -07:00
Peter Griess 78d33f4fd5 Fix options parsing
The current node has a bug where it will fail to pass the option argument
immediately preceding the first non-option argument to V8. That is the
--perf flag will be ignored by V8 when running 'node --perf script.js'.
2010-06-04 08:29:10 -07:00
Peter Griess 8f0b4e9111 Send and receive file descriptors through net.Stream.
a) create a layer of indirection in net.Stream to allow swapping in
different read/write implementations and

b) emit an 'fd' event when file descriptors are received over a UNIX pipe,
as finally as a tangential benefit

c) remove a bunch of conditionals from the primary codepaths for
ease-of-reading.
2010-06-02 18:16:53 -07:00
Orlando Vazquez 92da636b97 Add a parameter to spawn() that sets the child's stdio file descriptors.
After the child is forked, these file descriptors will get dup2()'d to STDIN,
STDIO, and STDERR.

(API may be changed.)
2010-06-02 10:41:24 -07:00
Ryan Dahl 501136b999 Revert "More dynmaic linking options"
Broke the build. Will fix and reapply soon.

This reverts commit 75f0cf471a.
2010-06-02 09:16:28 -07:00
Ryan Dahl 75f0cf471a More dynmaic linking options
This adds the following options to the `configure` program

  --shared-v8           Link to a shared V8 DLL instead of static linking
  --shared-v8-includes=SHARED_V8_INCLUDES
                        Directory containing V8 header files
  --shared-v8-libpath=SHARED_V8_LIBPATH
                        A directory to search for the shared V8 DLL
  --shared-cares        Link to a shared C-Ares DLL instead of static linking
  --shared-cares-includes=SHARED_CARES_INCLUDES
                        Directory containing C-Ares header files
  --shared-cares-libpath=SHARED_CARES_LIBPATH
                        A directory to search for the shared C-Ares DLL
  --shared-libev        Link to a shared libev DLL instead of static linking
  --shared-libev-includes=SHARED_LIBEV_INCLUDES
                        Directory containing libev header files
  --shared-libev-libpath=SHARED_LIBEV_LIBPATH
                        A directory to search for the shared libev DLL

and removes --system.
2010-06-01 20:18:43 -07:00
Ryan Dahl 78e49f1c88 Rename node_net2.cc to node_net.cc 2010-05-29 13:08:05 -07:00
Micheil Smith d89de07758 Adding experimental support for fs.chown and fs.chownSync.
Notes:
- Currently only accepts numeric user and group ids.
- No tests, as tests depend on getpwuid and getgrgid.
- No documentation, as there is no tests and this is experimental.
2010-05-26 13:37:45 -07:00
Ryan Dahl 35c14f637e In HTTP parser, proxy return value of onHeadersComplete 2010-05-25 19:25:38 -07:00
Ryan Dahl 2fca40e44f Upgrade http-parser 2010-05-25 19:25:35 -07:00
Ryan Dahl 3768aaaea4 Create a public Buffer constructor for use in addons. 2010-05-24 13:26:18 -07:00
Brian White ab5c0dd63e Port to OpenBSD 2010-05-23 17:08:57 -07:00
Ryan Dahl 0de138acb5 improve test for stdio non-blockingness 2010-05-21 01:22:20 -07:00
Ryan Dahl f73b6e2190 Fix opposite logic, which coincidentially works 2010-05-20 22:11:26 -07:00
Ryan Dahl 8c56284776 Remove unneeded fd variables in node_stdio.cc 2010-05-20 22:01:13 -07:00
Felix Geisendörfer c93e0aaf06 Deprecate string interface for fs.read()
This patch makes buffers the preferred output for fs.read() and
fs.readSync(). The old string interface is still supported by
converting buffers to strings dynamically. This allows to remove the
C++ code for string handling which is also part of this patch.
2010-05-20 16:31:18 -07:00
Ryan Dahl e84395ff8c Revert "Deprecate string interface for fs.read()"
This reverts commit cbbf9e43d1.
2010-05-20 16:11:33 -07:00
Felix Geisendörfer cbbf9e43d1 Deprecate string interface for fs.read()
This patch makes buffers the preferred output for fs.read() and
fs.readSync(). The old string interface is still supported by
converting buffers to strings dynamically. This allows to remove the
C++ code for string handling which is also part of this patch.
2010-05-20 15:25:49 -07:00
Ryan Dahl cbd2c3945b Throwing in a callback should kill the process
There is a difference between errors which happen to a socket - like
receiving EPIPE - an exceptional situation but ultimately okay and the
situation where code throws in a callback - which is not okay.

Fixes test/simple/test-http-exceptions.js

TODO: explain this in docs.
2010-05-20 15:23:36 -07:00
Ryan Dahl 44ad6a7db2 Make buffer's c++ constructor public 2010-05-20 09:44:10 -07:00
isaacs 78be1e4930 Remove the ReportException from the Script class
This is so that syntax errors can be handled discretely in places like the
repl, where SyntaxErrors are expected and normal.
2010-05-19 15:02:47 -07:00
Ryan Dahl d8af9d8edf Minor style changes for fs.write code 2010-05-19 14:59:03 -07:00
Felix Geisendörfer c46cbe0de4 Deprecate string interface for fs.write()
This patch makes buffers the preferred input for fs.write() and
fs.writeSync(). The old string interface is still supported by
converting strings to buffers dynamically. This allows to remove the
C++ code for string handling which is also part of this patch.
2010-05-19 12:53:43 -07:00