[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] bidirectional with Socket PDU
From: |
Jason Matusiak |
Subject: |
Re: [Discuss-gnuradio] bidirectional with Socket PDU |
Date: |
Fri, 14 Aug 2015 07:32:13 -0700 |
User-agent: |
Workspace Webmail 5.15.5 |
> If someone has an alternative, I am all ears (I'm coming up empty).
I got it working now. If someone wants to do something similar, what I
did was take the python example code from here:
http://www.binarytides.com/code-chat-application-server-client-sockets-python/
(the last section of code near the bottom of the article that shows how
to use the select function).
The example is for TCP (which worked fine), but if you want to use UDP,
just change the line:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
to
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)