# Opening Sockets to TCP devices using scripting

**URL:** <https://forum.inductiveautomation.com/t/opening-sockets-to-tcp-devices-using-scripting/76860>\
**Category:** Ignition\
**Tags:** ignition81, scripting\
**Created:** [July 25, 2023, 1:03pm UTC](https://forum.inductiveautomation.com/t/opening-sockets-to-tcp-devices-using-scripting/76860 "2023-07-25T13:03:41Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 26, 2023, 2:03pm UTC](https://forum.inductiveautomation.com/t/opening-sockets-to-tcp-devices-using-scripting/76860/7 "2023-07-26T14:03:03Z")

</div>

A very critical piece of advice if you end up opening your own sockets: make sure to use Java standard library imports, adapted to Jython. Resist the temptation to use the Python standard library, **especially** for socket related code. It's buggy and prone to resource leaks.

---

_[View the full topic](https://forum.inductiveautomation.com/t/opening-sockets-to-tcp-devices-using-scripting/76860)._
