fix the socketserver demo code for py3k
#4275 Thanks to Don MacMillen
diff --git a/Demo/sockets/udpecho.py b/Demo/sockets/udpecho.py
index 8a6bd21..9966fd8 100755
--- a/Demo/sockets/udpecho.py
+++ b/Demo/sockets/udpecho.py
@@ -56,7 +56,8 @@
line = sys.stdin.readline()
if not line:
break
- s.sendto(line, addr)
+ print('addr = ', addr)
+ s.sendto(bytes(line, 'ascii'), addr)
data, fromaddr = s.recvfrom(BUFSIZE)
print('client received %r from %r' % (data, fromaddr))
diff --git a/Demo/sockets/unixclient.py b/Demo/sockets/unixclient.py
index cdccb84..5e87eed 100644
--- a/Demo/sockets/unixclient.py
+++ b/Demo/sockets/unixclient.py
@@ -6,7 +6,7 @@
FILE = 'unix-socket'
s = socket(AF_UNIX, SOCK_STREAM)
s.connect(FILE)
-s.send('Hello, world')
+s.send(b'Hello, world')
data = s.recv(1024)
s.close()
print('Received', repr(data))