in reply to Problem with non-blocking sockets example from Cookbook - send() vs EWOULDBLOCK

My problem is that if you try to write a large amount of data at once to a socket, the code will incorrectly disconnect the client.
patient: Doctor, doctor, it hurts when I poke it, what do I do?!
doctor: So don't poke it.

In other words, code around it. Who wrote the client? You need to figure out why the client is not reading all of the data.

  • Comment on Re: Problem with non-blocking sockets example from Cookbook - send() vs EWOULDBLOCK

Replies are listed 'Best First'.
Re: Re: Problem with non-blocking sockets example from Cookbook - send() vs EWOULDBLOCK
by macdee_2 (Initiate) on Jan 18, 2004 at 20:31 UTC

    I wrote the client. It originally used my $str = <$socket> etc. When problems started developing, I rewrote using sysread, syswrite, to no avail. Moreover, I can have the same problem occur using Linux's telnet as a client. Are you going to tell me that's at fault?

    I agree that perhaps sending so much data at once is an unusual, but it should not be exceptional.

    Where I come from, it's better to fix the problem rather than the symptoms.

    Macdee