开发者

pop3 multiline problem

开发者 https://www.devze.com 2022-12-28 14:54 出处:网络
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 wi

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

精彩评论

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