At 10:13 AM 7/6/01 -0400, Stephen LeClaire wrote:
>I have a client server configured using the inetd daemon to call the
>server software. Most of the time, the server grabs all of the data
>sent by the client, but sometimes the server only grabs a portion of the
>data. I have verified, using snoop, that all the data from the client
>makes it to the server.
>
>The server script simply reads the standard input: "$msg = <STDIN>". I
>tried doing a "while ($msg = <STDIN>)" but it just causes things to
>hang. Any ideas and insights are greatly appreciated.
Depends on what your protocol is. The server will read up until the first
newline with your current approach. With your attempted approach it will
read until the socket is closed by the client, which I gather it isn't. So
you need to define your protocol so that the server can know when the
client has finished sending (that, or fork separate reading/writing
processes, or use select with a timeout).
--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com