🍵️

2021-12-22

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 Björn Wärmedal