Documentation ¶
Overview ¶
Package client defines a set of structs and methods to handle a SMTP client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Parent *net.Listener //The client's parent listener. Conn net.Conn //The client's network connection. Start time.Time //The connection start time. End time.Time //The connection end time. KeepOpen bool //Whether to keep Process() looping or not. TimeoutTimer *time.Timer //Timer to check whether the connection times out. }
Stores objects and data necessary to handle SMTP clients.
func MakeClient ¶
Creates a Client ready to be used, given a parent network listener and a network connection.
func (*Client) LocalEP ¶
Returns a string representing a client's connection local endpoint, complete of IP address and port.
func (*Client) Process ¶
func (c *Client) Process()
Loops and processes the client's commands, until something changes its Client's KeepOpen property to false, the client QUITs the session, or it encounters an error trying to read/write on the connection.
func (*Client) RemoteEP ¶
Returns a string representing a client's connection remote endpoint, complete of IP address and port.