Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #69114

Fwd: Basic asyncio usage

References <CAKWvM9keKvSgz88oiCjnRRxmna1U3cco-MzGmKZoD9z2q2NH1A@mail.gmail.com>
Date 2014-03-26 12:35 +0100
Subject Fwd: Basic asyncio usage
From Piotr Husiatyński <piotrhusiatynski@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.8569.1395833733.18130.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi,
I have posted the same question to python-tutor list *, but I'm trying
my luck here as advised.

I'm trying to get more familiar with asyncio library. Using python
3.4, I wrote simple echo server (see attachement for the code). I know
that instead of using bare bone send/recv I could use some of the
helper functions, but I want to start with the basics.

Using attached code, I can connect from multiple sources, but echo
won't work for all clients. Also, please look at the `sendall` mehtod
- I have to manually remove write callback, otherwise it will be
called all the time. Any tips on solving this problem?

* https://mail.python.org/pipermail/tutor/2014-March/100679.html

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Fwd: Basic asyncio usage Piotr Husiatyński <piotrhusiatynski@gmail.com> - 2014-03-26 12:35 +0100

csiph-web