Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.python
Re: UDP Client/Server
Guilherme Polo
1/23/2008 11:37:00 AM
2008/1/23, Martin Marcher <martin@marcher.name>:
> Guilherme Polo wrote:
> >> >>> class FooRequestHandler(BaseRequestHandler):
> >> ... def handle(self):
> >> ... data, addr_info = self.request[1].recvfrom(65534)
> >
> > Your FooReceiveServer subclasses UDPServer, it already handled the
> > recvfrom for you, so, this is wrong.
> >
>
> hmm then why do I receive every second request, shouldn't then no data at
> all come up?
>
Because you are blocked on that call waiting for data to come, so the
second request will wake up there. Next request you will get blocked
on this call again.
> Also the next thing that would be a problem would be if I do
>
> data = self.request[0]
>
> I do get the data but where would I get the info from to which endpoint I
> need to send the answer?
>
self.client_address. Also, you could use self.packet to get the data
> martin
>
> --
>
http://noneisyours.ma...
>
http://feeds.feedburner.com/N...
>
> You are not free to read this message,
> by doing so, you have violated my licence
> and are required to urinate publicly. Thank you.
>
> --
>
http://mail.python.org/mailman/listinfo/p...
>
--
-- Guilherme H. Polo Goncalves
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: UDP Client/Server
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password