# Sending data to TCP socket server on connect using logstash

**URL:** <https://discuss.elastic.co/t/sending-data-to-tcp-socket-server-on-connect-using-logstash/292221>\
**Category:** Logstash\
**Created:** [December 16, 2021, 8:40pm UTC](https://discuss.elastic.co/t/sending-data-to-tcp-socket-server-on-connect-using-logstash/292221 "2021-12-16T20:40:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bobby\_Maine](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bobby_maine/32/98742_2.png) [@Bobby\_Maine](https://discuss.elastic.co/u/Bobby_Maine)\
**Post date:** [December 16, 2021, 8:40pm UTC](https://discuss.elastic.co/t/sending-data-to-tcp-socket-server-on-connect-using-logstash/292221/1 "2021-12-16T20:40:05Z")

</div>

Hi - I have a question that are two parts

1. I am trying to configure logstash as a tcp socket client and have to send a message to the socket server each time the the socket client connects

2. All messages sent and received should be packaged within a STX(ascii 2) and ETX (ascii 3).  
Wondering if this is possible using logstash or should I write a bridge application between logstash and the socket server application.

Thank you in adavance for any help!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 13, 2022, 8:40pm UTC](https://discuss.elastic.co/t/sending-data-to-tcp-socket-server-on-connect-using-logstash/292221/2 "2022-01-13T20:40:23Z")

</div>

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