I’m trying to learn emacs elisp and trying to write a little program to connect to a TCP/IP port and process records that come back. In one case I’ll be parsing CSV data and in the another, I’ll be parsing JSON (e.g. from GPSD, and json.el thankfully comes with emacs). I’ve looked at the echo-server example, but I’m looking for a client example that shows connecting with make-network-process and processing line oriented data. It’s not http, so I can’t use url-retrieve-synchronously.
My elisp skills are really weak, so I’m looking for really basic examples.
Thanks!
I was looking for something a lot simpler. I’ve finally managed to code it from a stripped down TcpClient example. This works from the command line if you save it as client.el, do chmod +x client.el, and ./client.el. It will print out what ever the server decides to send and quit after 300 seconds. It really needs some comments to explain what it going on.