pydonkey-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pydonkey-general] Re: Problems


From: Joël Vennin
Subject: [Pydonkey-general] Re: Problems
Date: Mon, 19 May 2003 00:04:36 +0200
User-agent: KMail/1.5.1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le Dimanche 18 Mai 2003 20:42, vous avez écrit :
> If I see it right, is the python socket core only able to cope with 5
> Connections per Port at Maximum.
No i've tested it and no problem about number of connection.

>
> This is what determines the listen-method of all the socket classes.
>
> That won't do for edonkey at all.
>
> I attached the example I used, maybe there is another possibility.
>
> Is there a way on redirecting the sockets? Or do we need another kind of
> polling?
>
> What do you think?
I think we don't use asyncore module. Why ? Just because it doesn't have 
enough features.
What we need ?
        - Possibily to make UPD and TCP connections, not only, possible to 
connect on 
a file descriptor.
        - Listen on a specific port
        - Each connection can have it's own timeout ( very important)
        - Can limit speed not only for one connection but for a group of 
connection
        - Can set specific callback or redefine some method to handle easily a 
connection
        

So all this features all not inside asyncore, and asyncore is not designed to 
make this stuff.


So what i propose (not complet), similar as twisted matrix:
        
        A "Protocol class" which contains method which can be overloaded:
                - onConnect ()
                - onReceived ()
                - onDisconnect ()
                - onError ()
        This class contains a variable to send some data. The protocol doesn't 
manage 
the timeout and the bandwidth limitation.

        A "Connection Class" with subclasses whoses are able to connect in UDP, 
TCP, 
SSL (in the future) and other file descriptor. This type of object manage his 
own timeout and bandwidth limitation. All instance of connection object can 
be  referenced to a ConnectionGroup.

        
        A "ConnectionGroup Class", a connection group is able to limit a 
bandwidth 
for a group of connections. We can imagine severals policies to distribute 
the bandwidth.

        The unique connection Manager, manage all connections and connection 
groups. 
I think is derivated of an Connection group but update all connection with 
select or poll. There is an infinite loop which can call some callbacks ...

        Tomorrow i'll try to make something around this idea.

What do you think ?

Jol
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE+yAN3OzJ7itUoJpQRApssAKCaEc3fSh1Y52H7RCY0njWjuoyYeQCgiCbN
JeEQbMmxO+Qvaj9iLMzovDk=
=Pbt8
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]