Hi Sam,
The recommended way to remote control pretty much all of our instruments is to use a VISA (like
TekVISA) which handles the connection details for you (USB, GPIB, Ethernet, etc) and gives you a robust protocol for communication. You can then use a library in your favorite language (like pyvisa for Python) to write programs that send and receive data through VISA.
For Ethernet specifically, if you don't want to use VISA (which is probably a mistake), then you can use what we call "raw sockets", which is not well documented and significantly harder to use. To do this you simply connect to the instrument's IP on port 4000, you can then send commands and receive back data, similar to a Telnet interface.