cm0002@lemy.lol to Programmer Humor@programming.dev · 17 hours agoShoulda listenedlemy.lolimagemessage-square85linkfedilinkarrow-up1491arrow-down115
arrow-up1476arrow-down1imageShoulda listenedlemy.lolcm0002@lemy.lol to Programmer Humor@programming.dev · 17 hours agomessage-square85linkfedilink
minus-squarediaphragmwp@discuss.tchncs.delinkfedilinkEnglisharrow-up4·11 hours agoThe first two are frameworks, the third is: def serve(p: int, f): s = socket.socket() s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) # let me reset plz s.bind(("", p)) s.listen() while True: c, a = s.accept() c.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) t = threading.Thread(target=serve0, args=(c, a, f)) t.daemon = True t.start() I have an entire file of some really cursed malicious compliance code for when I was brutally forced to write Python.
The first two are frameworks, the third is:
def serve(p: int, f): s = socket.socket() s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) # let me reset plz s.bind(("", p)) s.listen() while True: c, a = s.accept() c.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) t = threading.Thread(target=serve0, args=(c, a, f)) t.daemon = True t.start()I have an entire file of some really cursed malicious compliance code for when I was brutally forced to write Python.