Socket API for devices on local LAN?

I’m new to SmartThings development, but couldn’t find a “yes” answer by searching and reading documentation.

I have a third-party hub on the same LAN as the ST hub, and this third-party hub only allows access via telnet, there is no REST API. To get my SmartApp/DH work with it, I had to write up a basic “man-in-the-middle” web server to take REST requests from ST and translate them into socket calls to/from third-party hub. It runs on a NAS that’s always on. Obviously this is not perfect (but gets the job done for me). Wondering if there’s a way to issue HubAction calls directly over sockets to avoid the intermediary web server part (which obviously doesn’t scale and one has to be a developer to make it all work together).