Plasma GitLab Archive
Projects Blog Knowledge

Class Netpop.client


class client : Netchannels.in_obj_channel -> Netchannels.out_obj_channel -> object .. end
The class client implements the POP3 protocol. Client objects are created by
 new client in_ch out_ch 
where in_ch is an input channel representing the input direction of the TCP stream, and where out_ch is an output channel representing the output direction of the TCP stream.

method state : state
Current state of this session.
method quit : unit -> unit
Requests the server to end this session. If the session is currently in the `Transaction state, the server will attempt to remove all messages marked as deleted before closing its side of the connection.
method user : user:string -> unit
Specifies the name of the mailbox the client would like to open using plain-text authentication. Normal completion of this function should be followed by the pass command.
method pass : pass:string -> unit
Authenticates a user with the plain-text password pass.
method apop : user:string -> pass:string -> unit
Specifies the user and password using APOP authentication. APOP is a more secure method of authentication than what is provided by the user/pass command sequence.
method stat : unit -> int * int * string
Returns information about the current mailbox as tuple (count,size,ext) where count is the number of messages in the mailbox, size is the size of the mailbox in octets, and ext is any server extension data.
method list : ?msgno:int -> unit -> (int, int * string) Hashtbl.t
Returns the scan listing for an optional message number or for all messages in the current mailbox. The result is a hash table that maps a message number to a tuple (size,ext) where size is the size of the message in octets, and ext is any server extension data.
method retr : msgno:int -> Netchannels.in_obj_channel
Retrieves a message from the server.
method dele : msgno:int -> unit
Marks the message number of the current mailbox for deletion.
method noop : unit -> unit
Pings the server to keep the session alive.
method rset : unit -> unit
Unmarks any messages that have previously been marked as deleted.
method top : ?lines:int -> msgno:int -> unit -> Netchannels.in_obj_channel
Returns the message header plus a limited number of lines of the message body. The default body length is 0 lines.
method uidl : ?msgno:int -> unit -> (int, string) Hashtbl.t
Returns the unique identifier(s) for an optional message number or for all messages in the current mailbox. The result is a hash table that maps a message number to its unique id.
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml