Staging
v0.5.1
https://github.com/python/cpython
Revision f226f408647044e531112ad16e95dba966d90970 authored by Anthony Baxter on 10 January 2002, 11:12:20 UTC, committed by Anthony Baxter on 10 January 2002, 11:12:20 UTC
sent with empty message.

sheesh. Lucky I decided it was worth doing last minute complete compile
tests. cvs merge stupid on my part fixed that made solaris builds totally
fail.
1 parent ca1512c
Raw File
Tip revision: f226f408647044e531112ad16e95dba966d90970 authored by Anthony Baxter on 10 January 2002, 11:12:20 UTC
cosmetic change to add a commit message for the last commit, accidently
Tip revision: f226f40
unixserver.py
# Echo server demo using Unix sockets (handles one connection only)
# Piet van Oostrum
from socket import *
FILE = 'blabla'             
s = socket(AF_UNIX, SOCK_STREAM)
s.bind(FILE)
print 'Sock name is: ['+s.getsockname()+']'
s.listen(1)
conn, addr = s.accept()
print 'Connected by', addr
while 1:
    data = conn.recv(1024)
    if not data: break
    conn.send(data)
conn.close()
back to top