开发者

pop3 multiline problem

i'm making a client for pop3 and somehow i can't figure out how to handle multiline responses. There is no difference in the response from server whether it is single or multiline, it always ends with CRLF (considering the usual case) so how do I know if I should call recv开发者_StackOverflow() once more?


Responses that can span more than one line (such as the contents of an email) are identified as such in the POP3 RFC.

The last line of a multi-line response just contains a dot "."

So look for "\r\n.\r\n"

That last line is a termination mark. It's not part of the actual message.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜