Added Python (Thanks to Beholder) - it fails to build properly using my build system,
so there's a precompiled binary included, with a hack in Android.mk to make it work on NDK r4b
This commit is contained in:
12
project/jni/python/src/Demo/sockets/unixclient.py
Normal file
12
project/jni/python/src/Demo/sockets/unixclient.py
Normal file
@@ -0,0 +1,12 @@
|
||||
# Echo client demo using Unix sockets
|
||||
# Piet van Oostrum
|
||||
|
||||
from socket import *
|
||||
|
||||
FILE = 'unix-socket'
|
||||
s = socket(AF_UNIX, SOCK_STREAM)
|
||||
s.connect(FILE)
|
||||
s.send('Hello, world')
|
||||
data = s.recv(1024)
|
||||
s.close()
|
||||
print 'Received', repr(data)
|
||||
Reference in New Issue
Block a user