Пример #1
0
void PopSession::SetConnection(MojRefCountedPtr<SocketConnection> connection)
{
	m_connection = connection;

	if(connection.get()) {
		m_inputStream = connection->GetInputStream();
		m_outputStream = connection->GetOutputStream();
	}
}
Пример #2
0
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();
	}
}