sockets and data??

Steve Holden sholden at holdenweb.com
Tue May 1 09:47:03 EDT 2001


"Miguel Angel Blanch Lardin" <x5101920 at fedro.ugr.es> wrote in message
news:3AEE993A.1317AAB3 at fedro.ugr.es...
>
>
> akhar wrote:
>
> > I have a python program that send text to a socket and another, the
server
> > program responds with the string and a hello.  now I try to transmit a
file,
> > and exeptions are raised?? I am actually trying to stream audio but the
file
> > won't read? what do I do to read while receiving data?
> > many thanks in advance
> > Stephane
>
> Woo!
> This looks exactly like my problem.
> I have realised that when data sent through a socket is bigger than 10000
bytes
> it breaks the connection.
>
Well, that shouldn't happen if your socket reception code is correct. Are
you looping, with a recv() call on the socket until you have read all the
data?

> So I wanted to know if someone else is aware of this problem, and if exist
an
> easy solution.
>
If you aren't careful it's quite easy to hang a server waiting for client
data which will never arrive, and this will eventually (2 hours?) time out
the socket. What specific errors are you seeing?

regards
 Steve





More information about the Python-list mailing list