summaryrefslogtreecommitdiff
path: root/src/gps_test.rb
diff options
context:
space:
mode:
authorJames Maki <jmaki@multitech.com>2010-11-19 10:04:58 -0600
committerJames Maki <jmaki@multitech.com>2010-11-19 10:04:58 -0600
commit8e799fec27f9c3b6a9f13c5002168025a00fbfc7 (patch)
treeb02c42ebd1371d9552fbfc107bf9850ecad3dfef /src/gps_test.rb
parentf1b137da46178ff963506db378560023d272e97a (diff)
downloadvenus-gps-8e799fec27f9c3b6a9f13c5002168025a00fbfc7.tar.gz
venus-gps-8e799fec27f9c3b6a9f13c5002168025a00fbfc7.tar.bz2
venus-gps-8e799fec27f9c3b6a9f13c5002168025a00fbfc7.zip
allow multiple consumers with pthreads
Diffstat (limited to 'src/gps_test.rb')
-rwxr-xr-xsrc/gps_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gps_test.rb b/src/gps_test.rb
index 8f64112..97532a6 100755
--- a/src/gps_test.rb
+++ b/src/gps_test.rb
@@ -7,7 +7,6 @@ GPS_SERVER_PORT = 5445
MODE = :tcp_server
#MODE = :tcp_client
#MODE = :udp_server
-#MODE = :serial
def tcp_read(sock)
loop {
@@ -25,6 +24,7 @@ def udp_read(sock)
loop {
begin
msg, sender = sock.recvfrom(1024)
+ p sender
p msg
rescue Errno::EAGAIN, Errno::EWOULDBLOCK => e
puts "recvfrom error: #{e.class}: #{e}"