platform/upstream/nodejs.git
15 years agorename Connection.disconnect -> Connection.close
Ryan [Sat, 2 May 2009 23:11:39 +0000 (01:11 +0200)]
rename Connection.disconnect -> Connection.close

15 years agocleanup: rename some of the callbacks
Ryan [Sat, 2 May 2009 23:06:21 +0000 (01:06 +0200)]
cleanup: rename some of the callbacks

15 years agoadd Connection::SendEOF. modify test accordingly.
Ryan [Sat, 2 May 2009 23:01:42 +0000 (01:01 +0200)]
add Connection::SendEOF. modify test accordingly.

15 years agoMajor refactor of network code
Ryan [Sat, 2 May 2009 14:34:24 +0000 (16:34 +0200)]
Major refactor of network code

Here I massively change both the external and internal API of the TCP
sockets and servers.

This change introduces the concept of a protocol object like is found in
Twisted Python. I believe this allows for a much cleaner description of how
a socket behaves. What was once a single object "client" or "connection" is
now represented by two objects: a "connection" and a "protocol".

Well - I don't want to ramble too much because neither API is yet public or
documented.  Look the diff of test/test-pingpong.js to see how things have
changed.

15 years agoAdd test for setInterval
Ryan [Wed, 29 Apr 2009 12:12:24 +0000 (14:12 +0200)]
Add test for setInterval

15 years agoRemove `if (pointer == NULL)` after allocations with `new`.
Ryan [Wed, 29 Apr 2009 12:05:25 +0000 (14:05 +0200)]
Remove `if (pointer == NULL)` after allocations with `new`.

I'm still learning C++.

15 years agoPublicize Socket and Server for eventual cooperation with HttpServer.
Ryan [Wed, 29 Apr 2009 12:00:22 +0000 (14:00 +0200)]
Publicize Socket and Server for eventual cooperation with HttpServer.

Also changed Init_net() to Socket::Initialize() and Server::Initialize().
Seems more object oriented, but I'm unsure how this will play when I want
load modules dynamically with dlopen(). I'll sit with it for a while and
see how it feels.

15 years agoremove process.{cc,h} process.exit() now exit()
Ryan [Wed, 29 Apr 2009 09:09:32 +0000 (11:09 +0200)]
remove process.{cc,h} process.exit() now exit()

the process object might return in the future but for now it is going away.

15 years agoRefactor setTimeout to be a Timer object.
Ryan [Wed, 29 Apr 2009 09:00:46 +0000 (11:00 +0200)]
Refactor setTimeout to be a Timer object.

Timer now uses ObjectWrap. setTimeout, setInterval are now implemented in
javascript.

15 years agoUse ObjectWrap base class for File, Socket, Server.
Ryan [Tue, 28 Apr 2009 23:07:19 +0000 (01:07 +0200)]
Use ObjectWrap base class for File, Socket, Server.

15 years agoCreate a node namespace
Ryan [Tue, 28 Apr 2009 21:09:56 +0000 (23:09 +0200)]
Create a node namespace

Part of general reorganization.

15 years agoUpdate liboi. Use EV_MULTIPLICITY=0.
Ryan [Tue, 28 Apr 2009 20:37:03 +0000 (22:37 +0200)]
Update liboi. Use EV_MULTIPLICITY=0.

This might need to be changed in the future if ev is needed in thread pools
or extension libraries. However for now it makes sense to just use a single
loop.

15 years agoget 'make install' working
Ryan [Thu, 23 Apr 2009 17:26:56 +0000 (19:26 +0200)]
get 'make install' working

15 years agochange localhost to 127.0.0.1 because macs suck
Ryan [Thu, 23 Apr 2009 17:04:01 +0000 (19:04 +0200)]
change localhost to 127.0.0.1 because macs suck

15 years agofix the waf configure --debug options. seems to work now.
Ryan [Thu, 23 Apr 2009 15:29:31 +0000 (17:29 +0200)]
fix the waf configure --debug options. seems to work now.

15 years agosign error on file position argument
Ryan [Thu, 23 Apr 2009 13:07:54 +0000 (15:07 +0200)]
sign error on file position argument

15 years agowasn't sending pos arg for puts()
Ryan [Thu, 23 Apr 2009 12:22:57 +0000 (14:22 +0200)]
wasn't sending pos arg for puts()

15 years agoWAF: fix the debug variant.
Ryan [Thu, 23 Apr 2009 11:18:38 +0000 (13:18 +0200)]
WAF: fix the debug variant.

problem is they both build by default. need a way to disable the debug variant.

15 years agoadd position arguments to File#read and File#write
Ryan [Thu, 23 Apr 2009 10:09:07 +0000 (12:09 +0200)]
add position arguments to File#read and File#write

15 years agoimproved ping pong test.
Ryan [Wed, 22 Apr 2009 23:14:11 +0000 (01:14 +0200)]
improved ping pong test.

15 years agoadd scons local for v8. check for librt in wscript
Ryan [Wed, 22 Apr 2009 17:55:08 +0000 (19:55 +0200)]
add scons local for v8. check for librt in wscript

15 years agoimport full versions of dependency libraries!
Ryan [Wed, 22 Apr 2009 17:35:47 +0000 (19:35 +0200)]
import full versions of dependency libraries!

15 years agoBROKEN COMMIT: removing git submodules
Ryan [Wed, 22 Apr 2009 16:17:56 +0000 (18:17 +0200)]
BROKEN COMMIT: removing git submodules

15 years agoupdate eio. add EIO_STACKSIZE define for getaddrinfo problem
Ryan [Wed, 22 Apr 2009 15:19:08 +0000 (17:19 +0200)]
update eio. add EIO_STACKSIZE define for getaddrinfo problem

15 years agorename echoserver -> pingpong
Ryan [Wed, 22 Apr 2009 14:05:14 +0000 (16:05 +0200)]
rename echoserver -> pingpong

15 years agobeef up the echoserver test
Ryan [Wed, 22 Apr 2009 14:04:05 +0000 (16:04 +0200)]
beef up the echoserver test

15 years agoadd echo test. remove debug printfs
Ryan [Wed, 22 Apr 2009 13:52:23 +0000 (15:52 +0200)]
add echo test. remove debug printfs

15 years agofix some errors/memleaks
Ryan [Wed, 22 Apr 2009 13:48:29 +0000 (15:48 +0200)]
fix some errors/memleaks

15 years agoimplment server.close
Ryan [Wed, 22 Apr 2009 12:09:17 +0000 (14:09 +0200)]
implment server.close

15 years agothrow error when given a bad arguement to socket.write
Ryan [Wed, 22 Apr 2009 12:01:06 +0000 (14:01 +0200)]
throw error when given a bad arguement to socket.write

15 years agobug fix: recving raw data was incorrect.
Ryan [Wed, 22 Apr 2009 11:59:28 +0000 (13:59 +0200)]
bug fix: recving raw data was incorrect.

15 years agotcp server is accepting connections now.
Ryan [Wed, 22 Apr 2009 11:52:30 +0000 (13:52 +0200)]
tcp server is accepting connections now.

(experiencing a problem with writing rawEncoding on the sockets. will fix in next commit.)

15 years agoadd framework for tcp server. change eio stacksize to 16kb.
Ryan [Wed, 22 Apr 2009 08:29:45 +0000 (10:29 +0200)]
add framework for tcp server. change eio stacksize to 16kb.

15 years agooops. call onConnect callback not onRead callback after connecting
Ryan [Tue, 21 Apr 2009 21:36:01 +0000 (23:36 +0200)]
oops. call onConnect callback not onRead callback after connecting

15 years agoadd async dns for Socket
Ryan [Tue, 21 Apr 2009 21:13:13 +0000 (23:13 +0200)]
add async dns for Socket

15 years agobegin clean up of Socket
Ryan [Tue, 21 Apr 2009 17:56:30 +0000 (19:56 +0200)]
begin clean up of Socket

15 years agoon_load -> onLoad
Ryan [Tue, 21 Apr 2009 14:30:47 +0000 (16:30 +0200)]
on_load -> onLoad

15 years agoclean up timers a bit
Ryan [Tue, 21 Apr 2009 14:22:14 +0000 (16:22 +0200)]
clean up timers a bit

15 years agoRename JS_ to NODE_ for method macros. add marcos to timers.cc
Ryan [Tue, 21 Apr 2009 13:55:11 +0000 (15:55 +0200)]
Rename JS_ to NODE_ for method macros. add marcos to timers.cc

15 years agoremove debug messages from module loading.
Ryan [Tue, 21 Apr 2009 12:38:55 +0000 (14:38 +0200)]
remove debug messages from module loading.

15 years agodebugging/improving the module framework
Ryan [Tue, 21 Apr 2009 11:52:21 +0000 (13:52 +0200)]
debugging/improving the module framework

15 years agoadd 'make test'
Ryan [Tue, 21 Apr 2009 11:51:05 +0000 (13:51 +0200)]
add 'make test'

15 years agoremove old test files
Ryan [Mon, 20 Apr 2009 16:48:25 +0000 (18:48 +0200)]
remove old test files

15 years agoensure socket closure in very old test scripts
Ryan [Mon, 20 Apr 2009 16:46:09 +0000 (18:46 +0200)]
ensure socket closure in very old test scripts

15 years agosmall cleanups to the require structure
Ryan [Mon, 20 Apr 2009 16:44:30 +0000 (18:44 +0200)]
small cleanups to the require structure

15 years agoreimplement module loading
Ryan [Mon, 20 Apr 2009 00:55:08 +0000 (02:55 +0200)]
reimplement module loading

still missing several important features and its mostly untested but the script
test/test-test.js is working and thats enough for now.

15 years agoadd File.cat
Ryan [Mon, 20 Apr 2009 00:54:36 +0000 (02:54 +0200)]
add File.cat

15 years agorename a few files to remove node_ prefix
Ryan [Sat, 18 Apr 2009 13:35:42 +0000 (15:35 +0200)]
rename a few files to remove node_ prefix

15 years agorename NewFile to File::New
Ryan [Sat, 18 Apr 2009 12:34:30 +0000 (14:34 +0200)]
rename NewFile to File::New

15 years agofix configure so it can handle --debug argument
Ryan [Sat, 18 Apr 2009 12:31:13 +0000 (14:31 +0200)]
fix configure so it can handle --debug argument

15 years agoadd File.stat File.exists File.strerror
Ryan [Sat, 18 Apr 2009 08:58:41 +0000 (10:58 +0200)]
add File.stat File.exists File.strerror

15 years agofix a bug with eio polling.
Ryan [Sat, 18 Apr 2009 00:01:23 +0000 (02:01 +0200)]
fix a bug with eio polling.

15 years agofile system methods to be queued.
Ryan [Fri, 17 Apr 2009 16:54:29 +0000 (18:54 +0200)]
file system methods to be queued.

15 years agoremove old readme
Ryan [Thu, 16 Apr 2009 19:40:25 +0000 (21:40 +0200)]
remove old readme

15 years agoadd file.read only. raw encoding right now.
Ryan [Thu, 16 Apr 2009 19:05:26 +0000 (21:05 +0200)]
add file.read only. raw encoding right now.

15 years agofile operations are queued.
Ryan [Thu, 16 Apr 2009 18:09:55 +0000 (20:09 +0200)]
file operations are queued.

15 years agoadd stdout stderr global file objects. remove node.blocking.print
Ryan [Thu, 16 Apr 2009 11:58:10 +0000 (13:58 +0200)]
add stdout stderr global file objects. remove node.blocking.print

15 years agoonly store fd in javascript (not in c++)
Ryan [Thu, 16 Apr 2009 11:42:34 +0000 (13:42 +0200)]
only store fd in javascript (not in c++)

15 years agoChange symantics of file.open. Now takes a callback argument.
Ryan [Thu, 16 Apr 2009 11:20:35 +0000 (13:20 +0200)]
Change symantics of file.open. Now takes a callback argument.

15 years agoupdate gitignore to work with waf files
Ryan [Thu, 16 Apr 2009 11:20:22 +0000 (13:20 +0200)]
update gitignore to work with waf files

15 years agoremove some old files
Ryan [Thu, 16 Apr 2009 11:20:02 +0000 (13:20 +0200)]
remove some old files

15 years agoadd file.write()
Ryan [Thu, 16 Apr 2009 09:37:44 +0000 (11:37 +0200)]
add file.write()

15 years agoRemove docs.
Ryan [Thu, 16 Apr 2009 09:36:39 +0000 (11:36 +0200)]
Remove docs.

API is changing too quickly for me to keep up with.  I will recreate them as
things start to stablize.

15 years agoadd file open/close
Ryan [Wed, 15 Apr 2009 19:23:10 +0000 (21:23 +0200)]
add file open/close

15 years agoeverything is changed. i've waited much too long to commit.
Ryan [Wed, 15 Apr 2009 08:08:28 +0000 (10:08 +0200)]
everything is changed. i've waited much too long to commit.

this is awful. i'm sorry for being so messy.

15 years agoenable support for the thread pool
Ryan [Sat, 4 Apr 2009 14:53:43 +0000 (16:53 +0200)]
enable support for the thread pool

15 years agouse the WAF build system
Ryan [Sat, 4 Apr 2009 12:50:15 +0000 (14:50 +0200)]
use the WAF build system

15 years agoadd dependencies: libeio, libev, v8
Ryan [Fri, 3 Apr 2009 11:43:03 +0000 (13:43 +0200)]
add dependencies: libeio, libev, v8

15 years agomore todo items
Ryan [Sun, 15 Mar 2009 15:02:23 +0000 (16:02 +0100)]
more todo items

15 years agoa few more todo items
Ryan [Sun, 15 Mar 2009 11:53:04 +0000 (12:53 +0100)]
a few more todo items

15 years agoa few more todo items
Ryan [Sun, 15 Mar 2009 11:51:51 +0000 (12:51 +0100)]
a few more todo items

15 years agoadd todo list
Ryan [Sun, 15 Mar 2009 11:31:35 +0000 (12:31 +0100)]
add todo list

15 years agoremove 'respond' from Request object in HTTPServer when connection is dead
Ryan [Sun, 15 Mar 2009 10:11:51 +0000 (11:11 +0100)]
remove 'respond' from Request object in HTTPServer when connection is dead

15 years agoheader fields should be symbols. enable fatal error messages.
Ryan [Sun, 15 Mar 2009 08:44:26 +0000 (09:44 +0100)]
header fields should be symbols. enable fatal error messages.

how do i get a stack trace on a fatal error?
http://groups.google.com/group/v8-users/browse_thread/thread/b70c70d568c332e1

15 years agoallow null host parameter to listen on localhost
Ryan [Fri, 13 Mar 2009 11:22:35 +0000 (12:22 +0100)]
allow null host parameter to listen on localhost

15 years agoreport errors from loaded files
Ryan [Mon, 9 Mar 2009 17:21:59 +0000 (18:21 +0100)]
report errors from loaded files

15 years agowith great performance hit, a patch to handle binary
Ryan [Mon, 9 Mar 2009 16:26:42 +0000 (17:26 +0100)]
with great performance hit, a patch to handle binary

(need to get the v8 people to produce something that doesn't require copying
buffers 20 times.)

15 years agochange HTTPServer constructor. Now: HTTPServer(host, port, onrequest);
Ryan [Mon, 9 Mar 2009 13:09:09 +0000 (14:09 +0100)]
change HTTPServer constructor. Now: HTTPServer(host, port, onrequest);

15 years agobetter reporting on fatal exceptions
Ryan [Mon, 9 Mar 2009 13:08:31 +0000 (14:08 +0100)]
better reporting on fatal exceptions

15 years agobetter error messages
Ryan [Mon, 9 Mar 2009 00:23:41 +0000 (01:23 +0100)]
better error messages

15 years agofixed bug in HTTPServer. wasn't properly destroying requests.
Ryan [Sat, 7 Mar 2009 16:08:35 +0000 (17:08 +0100)]
fixed bug in HTTPServer. wasn't properly destroying requests.

15 years agoworking towards working keep-alive. need tests
Ryan [Fri, 6 Mar 2009 18:49:52 +0000 (19:49 +0100)]
working towards working keep-alive. need tests

15 years agoadd blockingFileRead to tide me over until I can get a proper file interface.
Ryan [Thu, 5 Mar 2009 17:17:36 +0000 (18:17 +0100)]
add blockingFileRead to tide me over until I can get a proper file interface.

15 years agoadd some information about http request objects
Ryan [Thu, 5 Mar 2009 13:45:11 +0000 (14:45 +0100)]
add some information about http request objects

15 years agoadd minimal amount about HTTPServer to spec
Ryan [Thu, 5 Mar 2009 13:35:54 +0000 (14:35 +0100)]
add minimal amount about HTTPServer to spec

15 years agoupdate TCPClient specs
Ryan [Thu, 5 Mar 2009 13:22:09 +0000 (14:22 +0100)]
update TCPClient specs

15 years agocomplete tcp client (for the most part)
Ryan [Thu, 5 Mar 2009 12:53:21 +0000 (13:53 +0100)]
complete tcp client (for the most part)

15 years agohalf way implemented the new TCPClient
Ryan [Thu, 5 Mar 2009 12:41:10 +0000 (13:41 +0100)]
half way implemented the new TCPClient

15 years agoimplement setInterval()
Ryan [Wed, 4 Mar 2009 18:16:07 +0000 (19:16 +0100)]
implement setInterval()

15 years agoadd beginnings of a specification doc
Ryan [Wed, 4 Mar 2009 18:15:39 +0000 (19:15 +0100)]
add beginnings of a specification doc

15 years agoadd test/test_clearTimeout.rb
Ryan [Wed, 4 Mar 2009 11:04:04 +0000 (12:04 +0100)]
add test/test_clearTimeout.rb

15 years agoadd test_setTimeout
Ryan [Wed, 4 Mar 2009 10:54:20 +0000 (11:54 +0100)]
add test_setTimeout

Had to disable Init_tcp because it starts an oi_async thread pool and
prevents the node loop from exiting when no watchers remain. Not sure how
to deal with this problem in general because eventually we'll need the
thread pool.

15 years agoadd test/test_http_server_echo and 'make test'
Ryan [Wed, 4 Mar 2009 10:29:39 +0000 (11:29 +0100)]
add test/test_http_server_echo and 'make test'

15 years agoadd command line options
Ryan [Wed, 4 Mar 2009 09:22:37 +0000 (10:22 +0100)]
add command line options

15 years agorename module load function to Init_modulename(), like ruby
Ryan [Wed, 4 Mar 2009 09:08:33 +0000 (10:08 +0100)]
rename module load function to Init_modulename(), like ruby

15 years agoexit program on top level exceptions
Ryan [Tue, 3 Mar 2009 23:31:37 +0000 (00:31 +0100)]
exit program on top level exceptions

(also lots of reorg.)

15 years agoAdd beginnings of the setTimeout interface
Ryan [Tue, 3 Mar 2009 18:17:33 +0000 (19:17 +0100)]
Add beginnings of the setTimeout interface

15 years agorefactor js_request creation into method
Ryan [Tue, 3 Mar 2009 01:36:08 +0000 (02:36 +0100)]
refactor js_request creation into method

15 years agoavoid reallocating the same strings every request
Ryan [Tue, 3 Mar 2009 01:15:26 +0000 (02:15 +0100)]
avoid reallocating the same strings every request

15 years agoMajor refactoring: program name now "node"
Ryan [Tue, 3 Mar 2009 00:56:15 +0000 (01:56 +0100)]
Major refactoring: program name now "node"

Trying to make a more moduler design. Two libraries currently "TCP" and
"HTTP" each have their own file.

Other major feature added here is multiple web servers! excitement.