diff options
author | Florian Jung <flo@windfisch.org> | 2014-12-24 00:14:21 +0100 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2014-12-24 00:14:21 +0100 |
commit | 449cf1bbf0df985e43f7ac4f362c961b15ebe5d2 (patch) | |
tree | 2f44f0a2280612a0b0e5d6ab1d3e0f3ca81afaa0 /server.py | |
parent | e56c98a450ea5f125b337219787e58d692b9f675 (diff) |
video over netwörk :)
Diffstat (limited to 'server.py')
-rw-r--r-- | server.py | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -37,19 +37,14 @@ while True: # Receive the data in small chunks and retransmit it while True: data = connection.recv(16) - print >>sys.stderr, 'received "%s"' % data if data: if data=="get\n": status, frame = cap.read() framestr = frame.tostring() lenframestr=len(framestr) - print hex(lenframestr) - for i in xrange(0,4): - print hex(ord(encode_int(lenframestr)[i])) - print 'sending ',lenframestr,' bytes to the client' connection.sendall(encode_int(lenframestr)+framestr); - cv2.imshow("img",frame) - cv2.waitKey(20) + #cv2.imshow("img",frame) + #cv2.waitKey(1) else: print >>sys.stderr, 'no more data from', client_address break |