Ryan
2e5b85a13b
Some fixes to allow HTTPServer to begin listening.
Just tested it and it is accepting connections and parsing! Will add units
soon.
16 years ago
Ryan
9c3770d999
Implement HTTPServer (untested!)
Mostly this is setting up the proper interface to be able to create the HTTP
server.
16 years ago
Ryan
6149c6c49a
Fix HTTPConnection javascript inheritance.
16 years ago
Ryan
38726e7272
various clean ups; HTTPConnection (js side) inherits from TCPConnection
16 years ago
Ryan
be6b3acf0e
extract headers, status_code, path, http version from http messages.
still a work in progress.
16 years ago
Ryan
5a071ad72f
Begin refactor of http.cc. Remove libebb add http_parser.
And most of http.cc was deleted.
16 years ago
Ryan
15d24d8002
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.
16 years ago
Ryan
cbd342a12d
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.
16 years ago
Ryan
0f5170339c
remove process.{cc,h} process.exit() now exit()
the process object might return in the future but for now it is going away.
16 years ago
Ryan
f213a27657
Refactor setTimeout to be a Timer object.
Timer now uses ObjectWrap. setTimeout, setInterval are now implemented in
javascript.
16 years ago
Ryan
064c8f0252
Use ObjectWrap base class for File, Socket, Server.
16 years ago
Ryan
cf1c58063e
Create a node namespace
Part of general reorganization.
16 years ago
Ryan
90fc8d3622
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.
16 years ago
Ryan
d996b59d9c
fix some errors/memleaks
16 years ago
Ryan
1542fc6a0b
add async dns for Socket
16 years ago
Ryan
707f244291
begin clean up of Socket
16 years ago
Ryan
47fad676b4
Rename JS_ to NODE_ for method macros. add marcos to timers.cc
16 years ago
Ryan
408526a1c1
debugging/improving the module framework
16 years ago
Ryan
93f7f0dca0
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.
16 years ago
Ryan
67af958f81
rename a few files to remove node_ prefix
16 years ago
Ryan
5207226da3
fix a bug with eio polling.
16 years ago
Ryan
12d31dd0b7
file operations are queued.
16 years ago
Ryan
e303d950d9
add stdout stderr global file objects. remove node.blocking.print
16 years ago
Ryan
e8ce6ef790
add file open/close
16 years ago
Ryan
63a9cd3897
everything is changed. i've waited much too long to commit.
this is awful. i'm sorry for being so messy.
16 years ago
Ryan
0e9e927fcb
enable support for the thread pool
16 years ago
Ryan
1a126ed11c
use the WAF build system
16 years ago
Ryan
55097bb572
remove 'respond' from Request object in HTTPServer when connection is dead
16 years ago
Ryan
adf18d84af
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
16 years ago
Ryan
5b08b827f9
report errors from loaded files
16 years ago
Ryan
7b45c911ef
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.)
16 years ago
Ryan
e78917b3b0
better reporting on fatal exceptions
16 years ago
Ryan
5131e0a1ef
better error messages
16 years ago
Ryan
64ac9efb3d
fixed bug in HTTPServer. wasn't properly destroying requests.
16 years ago
Ryan
b4985d1a6e
working towards working keep-alive. need tests
16 years ago
Ryan
16ef5029de
add blockingFileRead to tide me over until I can get a proper file interface.
16 years ago
Ryan
93c7e88c87
half way implemented the new TCPClient
16 years ago
Ryan
8b71ba5e68
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.
16 years ago
Ryan
9e5eff3b27
add test/test_http_server_echo and 'make test'
16 years ago
Ryan
559c1987be
add command line options
16 years ago
Ryan
dbbd25ae65
rename module load function to Init_modulename(), like ruby
16 years ago
Ryan
e02b71ebe8
exit program on top level exceptions
(also lots of reorg.)
16 years ago
Ryan
a890b67406
Add beginnings of the setTimeout interface
16 years ago
Ryan
19478ed4b1
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.
16 years ago