💾 Archived View for warmedal.se › ~bjorn › posts › 2021-12-22-so-socket-happened.gmi captured on 2022-04-29 at 11:20:22. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-01-08)

-=-=-=-=-=-=-

So Socket Happened

I was discussing gemini servers with someone on IRC, and it's something about gemini that sort of baffles me: a full featured client like AV-98 is 1,500 lines of code, but all the servers I've seen are comparatively huge. Maybe it has to be that way. I haven't written a server since second year of uni, and there was no encryption involved.

This afternoon I built a single-threaded server that listens on a (non-encrypted) socket and upon a connection being made reads the message from the client and echoes it back before closing the connection. That's 14 lines, and the first time I write the server side of a socket in python. We'll see if it goes somewhere, and where that might be. Good practice either way.

-- CC0 ew0k, 2021-12-22