mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
To be a good citizen, it should really delete its socket when done.
This commit is contained in:
parent
cb3988c48b
commit
9463792c68
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue