[ale] Python (or other) socket identification
Alex Carver
agcarver+ale at acarver.net
Fri Feb 3 15:27:02 EST 2017
On 2017-02-03 06:27, Chris Fowler wrote:
> When I do this in perl I track with a hash. Add new entry after accept. Store
> peer info as a key.
>
> $client->{peer}{peer} =peer
> $client->{peer}{fd} = fd
>
> Place that fd into the select. Set select timeout short and process queue on TO.
> Do have logic to force process if select does not TO due to traffic. I got bit
> by that mistake.
This is what I was already trying to do. The problem is the ability to
look up a socket's peer or fd disappears if the socket closes leaving me
with no way to purge the hash of that entry (purging is handled in the
section of code that checks if a socket is timing out or breaks, it
deletes the entry from the list that's fed to select() and so would need
to do it in this tracking hash, too)
More information about the Ale
mailing list