socket on data event receives data with huge delay

14 views
Skip to first unread message

Jonas

unread,
Aug 28, 2015, 10:42:27 PM8/28/15
to nodejs

I'm using the latest node.js on windows 8.1 64bit.

I'm sending data from a java client to my node.js tcp server:

net.createServer().listen(12345, '127.0.0.1').on('connection', function(socket) { self.onConnection(socket); });

i attach the data event to the socket.

socket.on('data',       function(data) { self.onData(data); });

The problem: I do receive the data, however it is delayed by about a second.

receiving..1440501758499
receiving..1440501759554
receiving..1440501760250
receiving..1440501761296
receiving..1440501762353
receiving..1440501763196
receiving..1440501764244
receiving..1440501765317
receiving..1440501765860

I have no idea why this happens or what causes the delay. Any ideas?

Reply all
Reply to author
Forward
0 new messages