]> granicus.if.org Git - python/commitdiff
To be a good citizen, it should really delete its socket when done.
authorSkip Montanaro <skip@pobox.com>
Fri, 1 Aug 2003 14:20:02 +0000 (14:20 +0000)
committerSkip Montanaro <skip@pobox.com>
Fri, 1 Aug 2003 14:20:02 +0000 (14:20 +0000)
Demo/sockets/unixserver.py

index d4c706188f121c8af0d55dfd9e76cab31b1f8f4d..d4425f08c82dd9c1f4d612105f0af00ef9226520 100644 (file)
@@ -1,5 +1,6 @@
 # Echo server demo using Unix sockets (handles one connection only)
 # Piet van Oostrum
+import os
 from socket import *
 FILE = 'blabla'             
 s = socket(AF_UNIX, SOCK_STREAM)
@@ -13,3 +14,4 @@ while 1:
     if not data: break
     conn.send(data)
 conn.close()
+os.unlink(FILE)