Using ssl module over custom sockets

Johannes Bauer dfnsonfsduifb at gmx.de
Mon Jun 8 11:25:12 EDT 2015


On 08.06.2015 09:22, jbauer.usenet at gmail.com wrote:

> Something that I could always use as a workaround would be to open up a listening port locally in one thread and connection to that local port in a different thread, then forward packets. But that's pretty ugly and I'd like to avoid it.

Didn't actually have to do that. My solution now is to use
socket.socketpair() and forward traffic from there. Works reasonably
well and isn't racy (unlike opening up a local TCP/IP port would be).

So I think this solves the problem (although it'd still be cool to have
an alternative way of specifying a send/recv function IMHO).

Cheers,
Johannes


-- 
>> Wo hattest Du das Beben nochmal GENAU vorhergesagt?
> Zumindest nicht öffentlich!
Ah, der neueste und bis heute genialste Streich unsere großen
Kosmologen: Die Geheim-Vorhersage.
 - Karl Kaos über Rüdiger Thomas in dsa <hidbv3$om2$1 at speranza.aioe.org>



More information about the Python-list mailing list