# How do I dynamically set the time in TCP Request

**URL:** https://discourse.nodered.org/t/how-do-i-dynamically-set-the-time-in-tcp-request/53803
**Category:** General
**Created:** [16 November 2021 03:45 UTC](https://discourse.nodered.org/t/how-do-i-dynamically-set-the-time-in-tcp-request/53803 "2021-11-16T03:45:40Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![MaoMao](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/maomao/32/14279_2.png) [@MaoMao](https://discourse.nodered.org/u/MaoMao)
#### Post date: [16 November 2021 03:45 UTC](https://discourse.nodered.org/t/how-do-i-dynamically-set-the-time-in-tcp-request/53803/1 "2021-11-16T03:45:40Z")

</div>

I'm sorry to disturb you so much. For the node "TCP Request", I want to dynamically pass a time into the node instead of writing the time into the node in a fixed way. I tried to write "MSG.time". I don't know if this node can do that, maybe I wrote it wrong.

I would like to have a node where I can dynamically set host\port and receive time. If this node does not work, I wonder if there is such a node

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [16 November 2021 15:19 UTC](https://discourse.nodered.org/t/how-do-i-dynamically-set-the-time-in-tcp-request/53803/2 "2021-11-16T15:19:53Z")

</div>

Since it doesn't say anything in the help text that indicates that it is not possible.

---

<div class="post-metadata">

### Author: ![MaoMao](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/maomao/32/14279_2.png) [@MaoMao](https://discourse.nodered.org/u/MaoMao)
#### Post date: [25 November 2021 07:13 UTC](https://discourse.nodered.org/t/how-do-i-dynamically-set-the-time-in-tcp-request/53803/3 "2021-11-25T07:13:21Z")

</div>

Thank you for your answer, this result is too bad, I can't find how to pass parameters from the text, maybe it is not allowed to do so

---

<div class="post-metadata">

### Author: ![MaoMao](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/maomao/32/14279_2.png) [@MaoMao](https://discourse.nodered.org/u/MaoMao)
#### Post date: [25 November 2021 09:44 UTC](https://discourse.nodered.org/t/how-do-i-dynamically-set-the-time-in-tcp-request/53803/4 "2021-11-25T09:44:16Z")

</div>

Is there any node that can be dynamically set to host/port/return time

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [25 November 2021 10:34 UTC](https://discourse.nodered.org/t/how-do-i-dynamically-set-the-time-in-tcp-request/53803/5 "2021-11-25T10:34:30Z")

</div>

you can dynamically set the host and port by leaving them blank - but you cannot set the listening time dynamically.

**Note:** that time field is for how long to wait from when it gets the first packet back - in most cases if you are listening for small amounts of data then it may well all be in the first packet you receive.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [25 November 2021 13:30 UTC](https://discourse.nodered.org/t/how-do-i-dynamically-set-the-time-in-tcp-request/53803/6 "2021-11-25T13:30:43Z")

</div>

Why do you need to dynamically set the timeout time?

---

<div class="post-metadata">

### Author: ![MaoMao](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/maomao/32/14279_2.png) [@MaoMao](https://discourse.nodered.org/u/MaoMao)
#### Post date: [26 November 2021 03:40 UTC](https://discourse.nodered.org/t/how-do-i-dynamically-set-the-time-in-tcp-request/53803/7 "2021-11-26T03:40:05Z")

</div>

It's nice to have both of you talking about this.

I actually ran into this problem on the project: Originally a complete packet, is divided into multiple packets, although each time difference is not big, but it and affect me on the interpretation of the data, because it is not complete, and the response speed of some equipment like less, dynamic, set the time, so I want to some extend, or shorter, to improve operation efficiency.

So far I think so. I don't know if I'm wrong or if I should approach the problem from another way.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [26 November 2021 11:50 UTC](https://discourse.nodered.org/t/how-do-i-dynamically-set-the-time-in-tcp-request/53803/8 "2021-11-26T11:50:00Z")

</div>

I don't immediately see a way of doing it, other than using different tcp nodes for the different timeout requirements.

---

<div class="post-metadata">

### Author: ![MaoMao](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/maomao/32/14279_2.png) [@MaoMao](https://discourse.nodered.org/u/MaoMao)
#### Post date: [29 November 2021 09:22 UTC](https://discourse.nodered.org/t/how-do-i-dynamically-set-the-time-in-tcp-request/53803/9 "2021-11-29T09:22:45Z")

</div>

Oh, thank you

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [28 January 2022 09:23 UTC](https://discourse.nodered.org/t/how-do-i-dynamically-set-the-time-in-tcp-request/53803/10 "2022-01-28T09:23:20Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
