// Ouput stream for writing commands to the socket
nsCOMPtr<nsIOutputStream> m_outputStream; // this will be obtained from the transport interface
nsCOMPtr<nsIInputStream> m_inputStream;
// Ouput stream for writing commands to the socket
nsCOMPtr<nsITransport> m_transport;
nsCOMPtr<nsIRequest> m_request;
nsresult nsMsgProtocol:: LoadUrl(nsIURI * aURL, nsISupports * aConsumer)
{
//从transport获取输入流 nsCOMPtr<nsIInputStream> m_inputStream;
rv = m_transport->OpenInputStream(0, 0, 0, getter_AddRefs(m_inputStream));
///inputStream关联 pump 提供异步方法
nsCOMPtr<nsIInputStreamPump> pump;
rv = NS_NewInputStreamPump(getter_AddRefs(pump),
m_inputStream, -1, m_readCount);
m_request = pump; // keep a reference to the pump so we can cancel it
//注册有数据的通知 // put us in a state where we are always notified of incoming data
rv = pump->AsyncRead(this, urlSupports);
作者: hechengjin 时间: 2016-3-27 23:27
+OK richmail system v10(32d255323e8d829-c3ed4)
AUTH
-ERR Bad sequence of commands
CAPA
-ERR Bad sequence of commands
USER 13342978053@139.com
+OK
PASS cccccpassword
+OK login success
STAT
+OK 3 140231
QUIT
+OK dewey POP3 server signing off