void PopSession::SetConnection(MojRefCountedPtr<SocketConnection> connection) { m_connection = connection; if(connection.get()) { m_inputStream = connection->GetInputStream(); m_outputStream = connection->GetOutputStream(); } }
void ImapSession::Connected(const MojRefCountedPtr<SocketConnection>& connection) { m_connection = connection; if(connection.get()) { m_inputStream = connection->GetInputStream(); m_outputStream = connection->GetOutputStream(); m_closedSlot.cancel(); // make sure it's not connected to a slot m_connection->WatchClosed(m_closedSlot); if(NeedLoginCapabilities()) { CheckLoginCapabilities(); } else { LoginCapabilityComplete(); } } else { CheckQueue(); } }