
Net::IMAP::Server::Connection - Connection to a client

Maintains all of the state for a client connection to the IMAP server.

Creates a new connection; the server will take care of this step.
Returns the Net::IMAP::Server that this connection is on.
Returns the Coro process associated with this connection. For things interacting with this conneciton, it will probably be the current coroutine, except for interactions coming from event loops.
Returns the IO handle that can be used to read from or write to the client.
Gets or sets the Net::IMAP::Server::DefaultModel or descendant associated with this connection. Note that connections which have not authenticated yet do not have a model.
Gets or sets the Net::IMAP::Server::DefaultAuth or descendant associated with this connection. Note that connections which have not authenticated yet do not have an auth object.
Gets or sets the currently selected mailbox for this connection. This may trigger the sending of untagged notifications to the client.
Sends out a one-line untagged greeting to the client.
The main line handling loop. Since we are using Coro, this cedes to other coroutines whenever we block, given them a chance to run. We additionally cede after handling every command.
Updates the inactivity timer.
Returns the EV watcher in charge of the inactivity timer.
Handles a single line from the client. This is not quite the same as handling a command, because of client literals and continuation commands.
If a connection has pending state, contains the callback that will receive the next line of input.
Shuts down this connection, also closing the model and mailboxes.
Parses the line into the tag,
ommand,
and options.
Returns undef if parsing fails for some reason.
Returns true if the connection is unauthenticated.
Returns true if the connection is authenticated.
Returns true if the connection has selected a mailbox.
Returns true if the connection is protected by SSL or TLS.
Polls the currently selected mailbox, and resets the poll timer.
Forces a poll of the selected mailbox the next chance we get.
Gets or sets the last time the selected mailbox was polled, in seconds since the epoch.
Sends any untagged updates about the current mailbox to the client.
Parses and returns messages fitting the given sequence range. This is on the connection and not the mailbox because messages have connection-dependent sequence numbers.
Returns the sequence number for the given message.
Returns the current capability list for this connection,
as a string.
Connections not under TLS or SSL always have the LOGINDISABLED capability,
and no authentication capabilities.
The "auth_class" in Net::IMAP::Server's "sasl_provides" in Net::IMAP::Server::DefaultAuth method is used to list known AUTH= types.
Logs the message to standard error,
using warn.
Sends an untagged response to the client; a newline ia automatically appended.
Sends the mesage to the client. If the client's connection has dropped, or the send fails for whatever reason, "close" the connection and then die, which is caught by "handle_lines".