Follow

Fuck I have to write a simple HTTP server in C :blobpanic:

· · Web · 4 · 1 · 6

@matrix I've practically done it in my sleep

Maybe it's hard if you need to do it for windows, otherwise you basically just copy paste the man page example from bind(2) and then just glue plain text HTTP headers together. It's not hard

man7.org/linux/man-pages/man2/

@matrix Note it's talking about AF_UNIX and not AF_INET, that's here I think, but largely interchangeable for this if I remember
man7.org/linux/man-pages/man3/

@applejack It's supposed to run on Linux.
Lol, that's a nice hacky solution :omegalul:
Yeah, seems not that difficult now

@matrix This looks like a fun experiment with bind(). Have fun! =)

@xyfdi I'm going to. Semester hasn't even started yet so there's plenty of time.

Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.