Greetings.
I am writing an asynchronous server, and I use the standard library's
module asyncore.
I subclass asyncore.dispat cher. handle_accept works just right, that
is, when a client socket makes a request to connect to my server
socket, things that I set in handle_accept definition, happen. So, it
is OK. But, the problem is that handle_read does not work as expected.
Things I set in handle_read definition, do not happen when a client
socket sends me data. Why? Is this a known problem? Please, can you
help me?
Thanks a lot, in advance.
Best regards,
Aristotelis Mikropoulos
--
Programs must be written for people to read, and only incidentally for
machines to execute. 2 2076
That was not entirely helpful, it's way more likely a mistake you made
in subclassing dispatcher than a problem within asycore itself (that
ended up sounding a lot more mean/angry than intended, sorry ¬_¬ ),
you really need to show us what changes you made to asyncore.dispat cher
if you want help. Good luck.
Cheers,
Jordan
On Jan 25, 12:18 pm, Indy <ind...@gmail.c omwrote:
Greetings.
I am writing an asynchronous server, and I use the standard library's
module asyncore.
I subclass asyncore.dispat cher. handle_accept works just right, that
is, when a client socket makes a request to connect to my server
socket, things that I set in handle_accept definition, happen. So, it
is OK. But, the problem is that handle_read does not work as expected.
Things I set in handle_read definition, do not happen when a client
socket sends me data. Why? Is this a known problem? Please, can you
help me?
Thanks a lot, in advance.
Best regards,
Aristotelis Mikropoulos
--
Programs must be written for people to read, and only incidentally for
machines to execute.
---------- Forwarded message ----------
From: Indy <in****@gmail.c om>
Date: Jan 25, 2007 11:27 PM
Subject: Re: asyncore.dispat cher.handle_rea d
To: Jordan <jo************ @gmail.com>
OK, problem fixed. Thanks anyway :-)
On 25 Jan 2007 10:08:01 -0800, Jordan <jo************ @gmail.comwrote :
That was not entirely helpful, it's way more likely a mistake you made
in subclassing dispatcher than a problem within asycore itself (that
ended up sounding a lot more mean/angry than intended, sorry ¬_¬ ),
you really need to show us what changes you made to asyncore.dispat cher
if you want help. Good luck.
Cheers,
Jordan
On Jan 25, 12:18 pm, Indy <ind...@gmail.c omwrote:
Greetings.
I am writing an asynchronous server, and I use the standard library's
module asyncore.
I subclass asyncore.dispat cher. handle_accept works just right, that
is, when a client socket makes a request to connect to my server
socket, things that I set in handle_accept definition, happen. So, it
is OK. But, the problem is that handle_read does not work as expected.
Things I set in handle_read definition, do not happen when a client
socket sends me data. Why? Is this a known problem? Please, can you
help me?
Thanks a lot, in advance.
Best regards,
Aristotelis Mikropoulos
--
Programs must be written for people to read, and only incidentally for
machines to execute.
-- http://mail.python.org/mailman/listinfo/python-list
--
Programs must be written for people to read, and only incidentally for
machines to execute.
--
Programs must be written for people to read, and only incidentally for
machines to execute. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Michael Welsh |
last post by:
In order to learn sockets in Python I am trying to write a simple group chat
server and client. I need a little nudge, please. My question contains some
GUI but only as decoration. The root question is asyncore / asynchat. I
have read that twisted makes this all simple, but, I wanted to get my hands
dirty here for educational purposes.
I've managed to build a small echo server with asyncore and asynchat that can
handle any number of...
|
by: David M. Wilson |
last post by:
Hi peeps,
I finally got around recently to doing something serious using Python
for serving network clients asynchronously, deciding on asyncore as my
starting point.
After 2 days or so of fiddling about, I have decided, as many before
me have, that the current asyncore module is the most inflexible,
brain-dead, and useless module to be found on the face of the earth!
|
by: fishboy |
last post by:
Howdy,
I'm in middle of a personal project. Eventually it will download
multipart binary attachments and look for missing parts on other
servers. And so far I've got it to walk a newsgroup and download and
decode single part binaries.
I thought I'd post the code and see what people think. I'd appreciate
any feedback. It's my first program with generators and I'm worried
I'm making this twice and hard as it needs to be.
|
by: fishboy |
last post by:
Howdy,
Sorry if this is a double post. First try seemed to go into
hyperspace.
I'm working on a personal project. It's going to be a multipart
binary attachment downloader that will search alternate servers for
missing pieces. This is the working code so far. It will walk a
newsgroup and download and decode all the single part attachments.
Just change server,user,password,group at the bottom to something less
|
by: Freddie |
last post by:
Hi,
I've been mangling python-irclib into an asyncore class, so it fits in
nicely with the rest of my app. I ran into a problem with
asyncore.dispatcher_with_send (Python 2.3.4), though. Not sure if this
is the right place to file a bug, but here goes:
class dispatcher_with_send(dispatcher):
| |
by: export |
last post by:
Is there any tutorial and docs with samples how to use asyncore module?
Thanks
Lad
|
by: billie |
last post by:
Hi all. I've just terminated a server application using asyncore /
asynchat frameworks.
I wrote a test script that performs a lot of connections to the server
app and I discovered that asyncore (or better, select()) can manage
only a limited number of file descriptors (aka simultaneous
connections).
When this number is reached select() raises an error but asyncore
doesn't handle this exception (a crash occurs).
If you want to try this I...
|
by: Giampaolo Rodola' |
last post by:
Hi,
I post this message here in the hope someone using asyncore could
review
this.
Since the thing I miss mostly in asyncore is a system for calling a
function after a certain amount of time, I spent the last 3 days
trying
to implement this with the hopes that this could be included in
asyncore
in the the future.
|
by: Frank Millman |
last post by:
Hi all
I have been using my own home-brewed client/server technique for a
while, using socket and select. It seems to work ok. The server can
handle multiple clients. It does this by creating a new thread for
each connection. Each thread runs its own select loop.
I am making some fairly big changes, so I thought I would look at
asyncore. I modified my program to use asyncore without much trouble,
and it feels nicer. It uses async I/O...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |