Skip to content

Commit

Permalink
Added sending data from open cv app over UDP.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhema committed Apr 8, 2013
1 parent 0ddaf42 commit 28dea76
Show file tree
Hide file tree
Showing 17 changed files with 961 additions and 756 deletions.
6 changes: 3 additions & 3 deletions network/python/record_UDP.py
@@ -1,12 +1,12 @@
import socket

UDP_IP = "127.0.0.1"
UDP_PORT = 9000
UDP_PORT = 9999

sock = socket.socket(socket.AF_INET, # Internet
socket.SOCK_DGRAM) # UDP
sock.bind((UDP_IP, UDP_PORT))

while True:
data, addr = sock.recvfrom(1024) # buffer size is 1024 bytes
print "received message:", data
data, addr = sock.recvfrom(2048) # buffer size is 1024 bytes
print len(data),"received message:", data

0 comments on commit 28dea76

Please sign in to comment.