Lightwight socket IO wrapper

Marko Rauhamaa marko at pacujo.net
Mon Sep 21 10:49:46 CEST 2015


Marko Rauhamaa <marko at pacujo.net>:

> Chris Angelico <rosuav at gmail.com>:
>
>> On Mon, Sep 21, 2015 at 6:38 PM, Marko Rauhamaa <marko at pacujo.net> wrote:
>>> Only one reader can read a socket safely at any given time so mutual
>>> exclusion is needed.
>>>
>>> If you read "too much," the excess can be put in the application's read
>>> buffer where it is available for whoever wants to process the next
>>> message.
>>
>> Which works only if you have a single concept of "application's read
>> buffer".
>
> Well, the socket's read buffer.

To be exact, the application should associate a read buffer with each
socket.


Marko


More information about the Python-list mailing list