in reply to socket sending/getting one message then nothing

Well, your server never looks for any further messages from the client. After establishing a connection, the server prints the first line of data from that client, and then just goes back to wait for a new connection from another client.

You need to have some sort of loop which looks for additional input from the current client. If you plan on handling multiple clients at the same time, you will probably want to use select (or IO::Select). perlipc should prove helpful as well.

P.S. Your code appears to have been slightly munged, around the lines where input is being read.

  • Comment on Re: socket sending/getting one message then nothing

Replies are listed 'Best First'.
(jptxs) Re: socket sending/getting one message then nothing
by jptxs (Curate) on Apr 11, 2001 at 21:27 UTC
    thanks, chipmunk. that, indeed was it. the place I pulled this code from loops through and destroys and recreates the socket when it talks to the server - i.e. there are no persistant connections. So there it was not an issue. wasn't thinking it all the way through when I pulled it out to test for this next application. =)
    "A man's maturity -- consists in having found again the seriousness one had as a child, at play." --Nietzsche