Ryan
b763ee0ad4
Make onError work for TCPConnection.
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
09c2ae5c3e
Slight change in tcp connection constructor
For server-side sockets, no longer pass the server object to the
js constructor. This is set later with SetAcceptor.
I think the change is a bit strage and convoluted but it allows one give
protocol /classes/ to the c++ constructors instead of protocol instances.
This is nice because derived classes (like HTTP) don't need to copy the
protocol instanciation code.
16 years ago
Ryan
4860f1c92c
add onMessageComplete and onBody handlers.
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
bb6057d9ad
rename Connection.disconnect -> Connection.close
16 years ago
Ryan
13062832d8
cleanup: rename some of the callbacks
16 years ago
Ryan
1713386580
add Connection::SendEOF. modify test accordingly.
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
3886e183fd
Add test for setInterval
16 years ago
Ryan
fd392d0a50
Remove `if (pointer == NULL)` after allocations with `new`.
I'm still learning C++.
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
8e7bbf26e2
get 'make install' working
16 years ago
Ryan
f17ecf20be
change localhost to 127.0.0.1 because macs suck
16 years ago
Ryan
29b528c980
fix the waf configure --debug options. seems to work now.
16 years ago
Ryan
0ea7577a72
sign error on file position argument
16 years ago
Ryan
8a8e9df72e
wasn't sending pos arg for puts()
16 years ago
Ryan
a4593e3ebd
WAF: fix the debug variant.
problem is they both build by default. need a way to disable the debug variant.
16 years ago
Ryan
0b1e3240be
add position arguments to File#read and File#write
16 years ago
Ryan
8514e0627a
improved ping pong test.
16 years ago
Ryan
c62b124082
add scons local for v8. check for librt in wscript
16 years ago
Ryan
40c0f755c9
import full versions of dependency libraries!
16 years ago
Ryan
a93cf50307
BROKEN COMMIT: removing git submodules
16 years ago
Ryan
7703ad5153
update eio. add EIO_STACKSIZE define for getaddrinfo problem
16 years ago
Ryan
e6d96e8e66
rename echoserver -> pingpong
16 years ago
Ryan
f3f9a08de1
beef up the echoserver test
16 years ago
Ryan
63ec0454d2
add echo test. remove debug printfs
16 years ago
Ryan
d996b59d9c
fix some errors/memleaks
16 years ago
Ryan
48b4ac4a8d
implment server.close
16 years ago
Ryan
c986b99ddc
throw error when given a bad arguement to socket.write
16 years ago
Ryan
3095861199
bug fix: recving raw data was incorrect.
16 years ago
Ryan
5f902a61e1
tcp server is accepting connections now.
(experiencing a problem with writing rawEncoding on the sockets. will fix in next commit.)
16 years ago
Ryan
822d7fa27e
add framework for tcp server. change eio stacksize to 16kb.
16 years ago
Ryan
140a032894
oops. call onConnect callback not onRead callback after connecting
16 years ago
Ryan
1542fc6a0b
add async dns for Socket
16 years ago
Ryan
707f244291
begin clean up of Socket
16 years ago
Ryan
d105d88625
on_load -> onLoad
16 years ago
Ryan
5d57fa5060
clean up timers a bit
16 years ago
Ryan
47fad676b4
Rename JS_ to NODE_ for method macros. add marcos to timers.cc
16 years ago
Ryan
a0f2b8a0c5
remove debug messages from module loading.
16 years ago
Ryan
408526a1c1
debugging/improving the module framework
16 years ago
Ryan
ec9697b1ba
add 'make test'
16 years ago
Ryan
f5b2a8f072
remove old test files
16 years ago