# Using Java.net Socket

**URL:** <https://forum.inductiveautomation.com/t/using-java-net-socket/79962>\
**Category:** Ignition\
**Tags:** ignition81, scripting\
**Created:** [October 3, 2023, 7:18am UTC](https://forum.inductiveautomation.com/t/using-java-net-socket/79962 "2023-10-03T07:18:02Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 4, 2023, 11:19am UTC](https://forum.inductiveautomation.com/t/using-java-net-socket/79962/13 "2023-10-04T11:19:02Z")

</div>

You should not be iterating through all of the methods. Simply request the correct method with [.getMethod(java.lang.String,java.lang.Class...)](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html#getMethod(java.lang.String,java.lang.Class...)). It takes the string name of the method and additional parameters matching the data types of the desired overload. Get the `type()` of an empty `jarray` of bytes to get `byte[]` to supply to the function.

---

_[View the full topic](https://forum.inductiveautomation.com/t/using-java-net-socket/79962)._
