# Replicate tcp request

**URL:** <https://discourse.nodered.org/t/replicate-tcp-request/33139>\
**Category:** Developing Nodes\
**Created:** [21 September 2020 09:02 UTC](https://discourse.nodered.org/t/replicate-tcp-request/33139 "2020-09-21T09:02:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JosephDe](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@JosephDe](https://discourse.nodered.org/u/JosephDe)\
**Post date:** [21 September 2020 09:02 UTC](https://discourse.nodered.org/t/replicate-tcp-request/33139/1 "2020-09-21T09:02:09Z")

</div>

Hi everyone! I'm new to node red and want to create customise node to to control my remote device. I would like to start with the functionalities of tcp request node. And later gradually add functions to it. Is there any link where I can check the code(tcp request)? Or any link where I can make a start with my project in mind?

Thank you,  
Joe

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [21 September 2020 09:09 UTC](https://discourse.nodered.org/t/replicate-tcp-request/33139/2 "2020-09-21T09:09:53Z")

</div>

A good place to start wold be here (creating nodes)...

> **[Creating Nodes : Node-RED](https://nodered.org/docs/creating-nodes/)**

and here (node-red source code)...

> **[node-red/node-red](https://github.com/node-red/node-red/tree/master/packages/node_modules/@node-red/nodes/core/network)**
>
> Low-code programming for event-driven applications - node-red/node-red

---

<div class="post-metadata">

**Author:** ![JosephDe](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@JosephDe](https://discourse.nodered.org/u/JosephDe)\
**Post date:** [21 September 2020 09:12 UTC](https://discourse.nodered.org/t/replicate-tcp-request/33139/3 "2020-09-21T09:12:52Z")

</div>

@Steve-Mcl thank you for quick reply. 😃

---

<div class="post-metadata">

**Author:** ![JosephDe](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@JosephDe](https://discourse.nodered.org/u/JosephDe)\
**Post date:** [21 September 2020 11:08 UTC](https://discourse.nodered.org/t/replicate-tcp-request/33139/4 "2020-09-21T11:08:09Z")

</div>

I started to create a model node for my reference, a simple node that will display string to lower case and works fine. I change the function in the js file with code below

```auto
    RED.nodes.createNode(this,config);
      	var node = this;
        var net = require('net');
	var client = net.connect('7877,'192.168.1.12', function() {
	node.send('Connected!!');
	});

```

when I hit deploy there is no error but there is also no message if it successfully connected to ip address and port.

---

<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:** [20 November 2020 11:08 UTC](https://discourse.nodered.org/t/replicate-tcp-request/33139/5 "2020-11-20T11:08:19Z")

</div>

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