[ale] Python (or other) socket identification
Alex Carver
agcarver+ale at acarver.net
Sat Feb 4 01:16:52 EST 2017
On 2017-02-03 22:14, Alex Carver wrote:
> On 2017-02-03 13:58, Phil Turmel wrote:
>> On 02/03/2017 03:50 PM, Alex Carver wrote:
>>> device_command_queue = Queue.Queue()
>>>
>>> The device daemon thread just checks that queue in each loop to see if
>>> it's empty or not. If it's not empty, it runs through it and works on
>>> the data. The data is just tuples: (IP_of_device, payload)
>>
>> I'm saying put this work into the same thread that select()'s the
>> sockets for incoming data. That thread has the true and threadsafe
>> list of sockets.
>
> That's why I was confused because that's where it's already located. :)
> It just wasn't working because I couldn't key on socket objects.
Actually, I should point out that the sockets aren't taking incoming
data from my application. They're taking data from the devices. What
comes in from the application is just in-memory messages. These are
intended to go outbound to the devices via the already-open sockets.
More information about the Ale
mailing list