Tagged Questions
2
votes
1answer
3k views
NodeJS: What is the proper way to handling TCP socket streams ? Which delimiter should I use?
From what I understood here, "V8 has a generational garbage collector. Moves objects aound randomly. Node can’t get a pointer to raw string data to write to socket." so I shouldn't store data that ...
4
votes
1answer
1k views
How do I frame messages for sending over TCP with node.js?
I need to send a JSON string to a number of TCP clients from a node.js TCP server.
In order to read the messages from the socket/stream on the client side I need to do some sort of message framing. ...
3
votes
1answer
505 views
NodeJS TCP Server, onData small chunks
I made a simple NodeJS TCP server which a Java Client sends an image:
encodedImage = <a base64 encoded image>
out.write("IMG;" + encodedImage);
out.flush();
My NodeJS server is as follows:
...
1
vote
3answers
518 views
Can you connect client to client via web sockets without touching the server?
I don't quite know how to search this in google:
"client to client websocket connections"
"browser to browser websockets"
"websockets without a server"
Haha, is there a way for someone on a ...
2
votes
2answers
746 views
When to use TCP and HTTP in node.js?
Stupid question, but just making sure here:
When should I use TCP over HTTP? Are there any examples where one is better than the other?
1
vote
1answer
1k views
How does setKeepAlive in node.js work and how to implement it?
Cannot understand the philosophy of setKeepAlive method in Node.js' net sockets. What happens after initialDelay finishes?
0
votes
1answer
4k views
Client side tcp with node.js/socket.io?
I'm new to node.js/socket.io so I don't really know what I'm doing, but I've got this for my server side:
var app = require('net')
, fs = require('fs')
var server = app.createServer(function ...
3
votes
2answers
366 views
TCP Servers: Drop Connection, instead of resetting or responding?
Is it possible in Node.JS to "drop" a connection in such a way that
The client never receives a response (200, 404 or otherwise)
The client is never notified that the connection is terminated (never ...
2
votes
3answers
169 views
cannot connect to TCP server on CloudFoundry (localhost node.js works fine)
I have trouble connecting to my TCP server example running on CloudFoundry. When running my app.js file on a local node.js installation, it works just fine. Specifically, when I run the CloudFoundry ...
1
vote
0answers
315 views
Node.JS on Solaris: Increase TCP's Initial Congestion Window to 10 segments (tcp slow-start)
How can the Initial Congestion Window be increased to 10? I read a suggestion that it can be done with TCP_INIT_CWND, but I don't know how to do that.
I originally posted this to ServerFault because ...
0
votes
1answer
670 views
How can a Node.js Socket Server know which IP or domain that the client connect to?
How can I know which IP/hostname the client connect to in node.js TCP Server?
var server = net.createServer(function (stream) {
// The server is behind a firewall,
// how can I know how the ...
-1
votes
1answer
1k views
How to connect to tcp server via node.js/socket.io from client?
I've set up a tcp server using node.js/socket.io, but I can't figure out how to connect to it via the client side. I've tried the client code from http://socket.io/#how-to-use but it sends a http ...