# TCP connect node splits answer in the middle

**URL:** <https://discourse.nodered.org/t/tcp-connect-node-splits-answer-in-the-middle/82313>\
**Category:** General\
**Tags:** function-node\
**Created:** [24 October 2023 19:55 UTC](https://discourse.nodered.org/t/tcp-connect-node-splits-answer-in-the-middle/82313 "2023-10-24T19:55:16Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![FloRu](https://avatars.discourse-cdn.com/v4/letter/f/db5fbb/32.png) [@FloRu](https://discourse.nodered.org/u/FloRu)\
**Post date:** [25 October 2023 19:06 UTC](https://discourse.nodered.org/t/tcp-connect-node-splits-answer-in-the-middle/82313/9 "2023-10-25T19:06:05Z")

</div>

> [@dceejay](#):
>
> Must admit I'm slightly surprised that any extra input that arrives would ever make it longer than the stated length.... what extra are they sending to make it too long ?

Oh, an information I should have been posting before (sorry for that):  
All Information comes with four equal predefined bytes, followed by four bytes which contain the length of the JSON object that follows those 8 bytes. (see here: [Connect to a TCP Server with special packet order](https://discourse.nodered.org/t/connect-to-a-tcp-server-with-special-packet-order/82162))  
It is interesting, that the request TCP node nearly always splits the information immediately after the first 8 bytes and then - if the object is big enough - again after 1343 bytes.  
Sometimes - but very seldom - there is only a second part that has up to around 14 something bytes, which is good to handle for me. Now I try to solve the third message parts...

@marcus-j-davies Thanks Marcus for this starting point. I'm gonna come back as soon as I stumble at the next point! 😉

---

_[View the full topic](https://discourse.nodered.org/t/tcp-connect-node-splits-answer-in-the-middle/82313)._
