What's New
- No longer Telnet-centric; my aim is to keep connections generic and wrap them in protocol handlers.
- Services; you can now run multiple services under a single server. Each service listens on a different port and can have unique protocols and events.
- Added hooks for coroutine-based, character-at-a-time protocol handlers.
- No longer line-based; the new API has get_ch() to get one character or get_input() to retrieve the entire input buffer. This is support users that want to write features like text editors and command completion.
- New event; on_input() that is called when the data is received from the client.
- When run under Linux, it uses the Epoll API introduced in Linux kernel 2.5.44. All other platforms user Select().
4 comments:
The problem with select, is that on Windows it is limited to passing in 512 file descriptors at a time I believe. So if you are going to use it, then you're probably going to want to call it multiple times with batches if you are over this limit -- at least on Windows.
Forgot to tick the box which gets me follow up comments, which must be a nice new addition from blogger. So this comment is me doing that :-)
Yeah, we had a discussion about that a while back on MudBytes. Currently, I hackishly cap to 512 on Windows but according to this post by the asyncore maintainer, 'paging' the sockets should work:
http://bugs.python.org/issue1685000
I think I'll aim for 1,000 sockets across all platforms, which means a max of two sweeps per poll on Windows.
I really feel very interesting to read your articles... You have blog posts on protocols. I love to visit your blogs often.. Thanks for sharing it with us. Ecommerce website developers
Post a Comment