Yes: Beginning
If you have questions like this I suggest starting a new thread. You've about hijacked this one as this isn't helping the OP.
Yes: Beginning
If you have questions like this I suggest starting a new thread. You've about hijacked this one as this isn't helping the OP.
If you understand what you're doing, you're not learning anything.
Not. You're making the incorrect assumption that he's reading in one line at a time. Again...documentation. Directly from the RFC that the OP mentioned in the very first post of this thread:
Responses to certain commands are multi-line. In these cases, which
are clearly indicated below, after sending the first line of the
response and a CRLF, any additional lines are sent, each terminated
by a CRLF pair.
If you understand what you're doing, you're not learning anything.
EOF cannot be stored in a char. Must you crap up every thread?
Quzah.
Hope is the first step on the road to disappointment.
MDofRockyView: I'll be happy to fully document my code for you when it's finished.
Can't work on it at the mo as I'm in work, but I got a few ideas from my sleep last night (as you do). Gonna turn this "jumping through lines" bit into a function that returns null-terminated lines from the buffer until it reaches the end.
But essentially the size of the message as reported by the LIST command isn't being matched by my code as it goes through the lines and counts the bytes it has read.
You might think it's a bit of a pointless act but the whole idea behind it is to flick through the buffer as the packets come in and extract header information. As there isn't any standard mechanism with which I can get the headers (If you're gonna reply with "TOP", don't bother, it's an optional command and isn't implemented on the server I'm talking to) and I don't want to store the entire message and then read through it I'm taking the streaming approach.