in reply to Waiting for input, without sleep

I need to wait for a full message back from the system.

What's the format of a message?

Replies are listed 'Best First'.
Re^2: Waiting for input, without sleep
by Trihedralguy (Pilgrim) on Jun 30, 2009 at 15:57 UTC
    Its just a string that comes back in, however there is one section of information I get back that is of variable length. This is why I have it set to the high 4000.
      That doesn't answer anything. Strings are objects consisting of a length and a series of characters. How do you encode these (individually if applicable, and as a whole)?
        I'm not sure what to say really. I open a socket and get a message back from the server. My initial script above works just fine however, I was just thinking there might be a better way to get the message back.

        The server is sending the message back to me in HEX, but as you can guess by my function name, i'm displaying the hex version and converting it to a "string" or human readable stuff.