Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7020875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:22:31+00:00 2026-05-27T23:22:31+00:00

I have a problem when receiving large packets in Node.js through a TCP connection.

  • 0

I have a problem when receiving large packets in Node.js through a TCP connection.
It seems that there is a cap in the buffer set to about 55kB. When I receive large amounts of data (about 70-80k) it splits this data up.

Now, I’ve worked with UDP sockets, I know how to expect on('data', function(){}) events and how to expect an on('end', function(){}) when the message is finally received, the problem with the TCP is that I never receive an on('end', function(){}) event, the server (in C#) never sends a FIN packet. This is due to me requiring to keep the socket alive and ongoing (we don’t want to shut it down).

Is there some sort of way to send a FIN packet, from the C# to the Node.js one, without having to shut down/close the socket?

Or, alternativelly, is some sort of way to trigger the on('end', function(){}) event inside node itself?

Regards.

EDIT:
To add up to the question, say for instance I have 2 clients attempting to acquire information through the TCP socket. One connects first, and gets a huge request (no problem on the size here).

But whilst this request is being handled, another one does the same request, since the TCP connection is through node, they’re using the same socket.
Is there any way to differentiate the requests? or will I have to set up a socket for each request being done to the TCP server?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:22:32+00:00Added an answer on May 27, 2026 at 11:22 pm

    UDP is packet-oriented. You can send as much data as will fit in a packet, up to an absolute maximum of 65,507 bytes. It’s fire and forget, with no intrinsic mechanism for handling packet loss or reordering.

    TCP is stream-oriented. Your data will be split up into packets based on a few factors including volume of data and transmission rate. This is mostly beyond your control and managed by the TCP/IP stack. What you get in return is an ordered sequence of packets and a degree of fault-tolerance (correct packet ordering is guaranteed and lost/duplicate packets are detected and dealt with by the TCP/IP protocol stack transparently to application code).

    If you’re working at the socket level in node you will almost certainly get multiple callbacks, each containing a chunk of data. It’s up to you to stitch it back together. This is a good thing – it means you can define your own mechanism for identifying message boundaries, data compression etc etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this problem.. I'm receiving data from a client..Using a socket connection. But
I have a Network Client class that is receiving a large binary block and
I have problem in some JavaScript that I am writing where the Switch statement
I have problem with fancybox. I want to write a function that will run
i have problem with autorotate on iphone i set up in all classes -
I have problem with cakephp's Session->write method. If I set a value like $_SESSION['..']
I have a TCP socket client receiving messages (data) from a server. messages are
I have this problem in a bigger Project...... so I set up a 'Testpoject'
I have a problem with a socket library that uses WSAASyncSelect to put the
Scenarion: VOIP - Sending and Receiving UDP packets at the same time I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.