Ryan
5558bc4e6e
Add connection.remoteAddress for server-side node.tcp.Connections.
16 years ago
Ryan
6e4e228665
Don't use AI_PASSIVE in getaddrinfo() for client connections.
16 years ago
Ryan
c226f81768
Fix HTTP client output bug.
16 years ago
Ryan
c457b829e2
If http.Client has an error, do not continue to reconnect.
16 years ago
Ryan
8cfdd326a8
Add "had_error" argument to the "onDisconnect" in node.tcp.Client
This is a boolean value which allows one to detect if the socket was closed
due to errors. There is not yet a way to look up the actual error code.
16 years ago
Ryan
8bf2a2fa55
Rename req.uri.queryKey to req.uri.params. More familar to rails users.
16 years ago
Ryan
ed283dc280
Fix bug: catting non-existent files
16 years ago
Ryan
aceb1987ed
Remove complex string appending in http's send() method.
That seems to churn the garbage collector like mad.
Before: http://s3.amazonaws.com/four.livejournal/20090529/timeseries6.png
After: http://s3.amazonaws.com/four.livejournal/20090529/timeseries11.png
Got a nice tight side profile for this benchmark now:
http://s3.amazonaws.com/four.livejournal/20090529/hist10.png
16 years ago
Ryan
247c9d2210
Remove unnecessary AdjustAmountOfExternalAllocatedMemory from node.http.
16 years ago
Ryan
34a6f10695
Fix ::exit() compile issues.
Thanks Matthias!
16 years ago
Ryan
11b2e5dcc4
Remove file access flags that arn't present in macintosh.
16 years ago
Ryan
b260a9108b
Add errno constants. Move all constants to `node.constants` namespace.
16 years ago
Ryan
3bdd042a6e
Rename fatal_exception to FatalException
16 years ago
Ryan
c4e53c7ceb
Have connection.setEncoding use node::ParseEncoding
16 years ago
Ryan
e8f177aa2d
Clean up outgoing encoding API. Generally: send(chunk, encoding).
16 years ago
Ryan
c326614c8d
More docs. Add rmdir and unlink.
16 years ago
Ryan
a9f29cd18d
File I/O documentation. Remove necessity of class="sh_javascript".
16 years ago
Ryan
2fe090b7f6
Add node.fs prefix to some constants. oops.
16 years ago
Ryan
d1b0ce6d37
Large refactor of file code.
All the c++ code is now reduced to simple wrappers. The node.fs.File object
is defined entirely in javascript now. As is the actionQueue methods.
This makes the boundaries much cleaner. There is still some thought that
needs to go into how exactly the API should behave but this simplification
is a first step.
16 years ago
Ryan
3eb4819db1
Add docs. Rename exit() to node.exit().
16 years ago
Ryan
5c2389fada
Remove error codes from file on_completion callbacks. Use file.onError.
The error codes still remain for the two general file system operations:
rename and stat.
Additionally I've removed the actionQueue for file system operations. They
are sent directly into the thread pool.
16 years ago
Ryan
58c13e5192
Namespace File stuff in node.fs
16 years ago
Ryan
6244f77822
Beginnings of file i/o docs. Finish up timers.
16 years ago
Ryan
cb3a11d72a
Camel case status_code and http_version.
16 years ago
Ryan
81b39a04cd
Add setBodyEncoding to http client responses.
16 years ago
Ryan
a1aecc9378
HTTP Server: Close 1.0 connections properly.
16 years ago
Ryan
0ef5c99973
Add http.ServerRequest.setBodyEncoding. Needs test still.
16 years ago
Ryan
1b54e3d87d
Change encoding setter/getter to setEncoding function.
16 years ago
Ryan
82e773630b
HTTP Client: add fix to allow TCP connection to reconnect.
16 years ago
Ryan
b445514898
Remove debugging statement.
16 years ago
Ryan
6a172d7119
Fix a bug in HTTP server when receiving half-closes.
16 years ago
Ryan
a5d5056327
Bug fix: need to return readyState symbol from scope.
16 years ago
Ryan
536eceaa2d
Debugging http. Add simple test. (Does not pass.)
16 years ago
Ryan
3700568322
Add request method. (How could that be missing still?)
16 years ago
Ryan
87e6578aa9
Simple HTTP client is working a bit.
16 years ago
Ryan
3bc73ba967
Add ParseUri to the node namespace
16 years ago
Ryan
edc38b4134
Use parseUri() for req.uri. Update docs.
16 years ago
Ryan
9c70bf356b
HTTP Server: check the ready state of the connection before each send.
16 years ago
Ryan
310eed03e0
Clean up readyState handling. Add test.
16 years ago
Ryan
69ab87ca53
Fix crash in oi_socket; add ready state reader to Connection objects.
16 years ago
Ryan
478e45a32f
Change request handler to take two parameters: req, res.
This is more semantic, albeit unnecessary, usage. I think users will
be able to remember the API more easily.
16 years ago
Ryan
9a63d8ec28
Remove v8 prefix from function template callbacks.
16 years ago
Ryan
175223d5d7
Remove HTTP parser callbacks for fragment, query_string, path.
Instead we're going to just get a single callback for the URI. This can be
parsed additionally in javascript using parseuri:
http://blog.stevenlevithan.com/archives/parseuri
I haven't added that yet, but it will come soon.
16 years ago
Ryan
91bd3124ad
Add sendUtf8 method to socket objects.
Encoding UTF-16 (the native string representation) to UTF-8 is rather
expensive, however just chopping off the second bit to convert UTF-16 to
ASCII is rather fast. I've noticed major performance issues with
String::WriteUtf8 and thus I'm going to explicitly separate in the API.
Still need interfaces to this for the web server.
16 years ago
Ryan
2cb81113ec
Slightly better buffer allocation. (Probably not worth it.)
16 years ago
Ryan
fb96f07ece
Commit partial work in http.js. Comment out V8::Dispose(); in node.cc
16 years ago
Ryan
baed9d514d
Inform V8 of external allocations.
This is sloppy: after each ObjectWrap allocation the user needs to
call ObjectWrap::InformV8ofAllocation(). In addition each class deriving
from ObjectWrap needs to implement the virtual method size() which should
return the size of the derived class. If I was better at C++ I could
possibly make this less ugly. For now this is how it is.
Memory usage looks much better after this commit.
16 years ago
Ryan
81691c7dc5
Fixes to get HTTP working with new TCP API.
16 years ago
Ryan
589d8af5d4
Wrap NewInstance with TryCatch. (Was still missing the error.)
16 years ago
Ryan
febbf75302
Wrap calls in TryCatch; Check return values after UNWRAP.
This is to avoid a segfault when you don't use the API correctly.
16 years ago