My favorites
▼
|
Sign in
accelerometer-simulator
Use iPhone accelerometer with the iPhone simulator or other apps
Project Home
Downloads
Wiki
Issues
Source
Checkout
Browse
Changes
Source path:
svn
/
trunk
/
Utilities
/
testaccsim.py
r22
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import SocketServer
PORTNO = 10552
class handler(SocketServer.DatagramRequestHandler):
def handle(self):
newmsg = self.rfile.readline().rstrip()
print "Client %s said ``%s''" % (self.client_address[0], newmsg)
self.wfile.write(self.server.oldmsg)
self.server.oldmsg = newmsg
s = SocketServer.UDPServer(('',PORTNO), handler)
print "Awaiting UDP messages on port %d" % PORTNO
s.oldmsg = "This is the starting message."
s.serve_forever()
Show details
Hide details
Change log
r13
by otto.chrons on Sep 28, 2008
Diff
Added Python test client
Go to:
/trunk/Utilities
/trunk/Utilities/testaccsim.py
Project members,
sign in
to write a code review
Older revisions
All revisions of this file
File info
Size: 491 bytes, 16 lines
View raw file
Powered by
Google Project Hosting