i'm trying to communicate with a server which sends output down a socket.
The server sends a code and then some text (e.g  01: Connection Refused).
What i'd like to do is just recv the first 2 bytes and act on them, instead
of having to recv the whole line (i don't know how long the lines of text
are, they can be changed), if i do a recv for 2 bytes i'll get '01'
but then the next recv will get the rest of the text won't it?

i could recv 1 byte at a time, storing the characters in a buffer, until a
newline was found (all output from the server ends in \n) but that sounds
overly complicated.

-- 
+++      The program isn't debugged until the last user is dead.     +++
[EMAIL PROTECTED]         http://www.penguinpowered.com/~a_out

Reply via email to