client

package
v0.0.0-...-dfc110a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2015 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoCommand = errors.New("No command found in message")

Functions

This section is empty.

Types

type Address

type Address struct {
	Name     string
	User     string
	Hostname string
}

func NewAddress

func NewAddress(a mail.Address) Address

func (Address) Address

func (a Address) Address() string

func (Address) String

func (a Address) String() string

type Addresses

type Addresses []Address

func (Addresses) Addresses

func (a Addresses) Addresses() []string

func (Addresses) Strings

func (a Addresses) Strings() []string

type Client

type Client struct {
	Writer         io.Writer
	DataReader     *bufio.Reader
	CommandScanner *bufio.Scanner
	Helloed        bool
	AllowAddress   server.AllowAddrFunc
	// contains filtered or unexported fields
}

func NewClient

func NewClient(c net.Conn, s *server.Server) Client

func (*Client) FlushReader

func (client *Client) FlushReader()

func (*Client) Handle

func (client *Client) Handle()

func (*Client) HandleAuth

func (client *Client) HandleAuth(msg Message)

func (*Client) HandleData

func (client *Client) HandleData(msg Message)

func (*Client) HandleHelo

func (client *Client) HandleHelo(msg Message)

func (*Client) HandleMail

func (client *Client) HandleMail(msg Message)

func (*Client) HandleRecipient

func (client *Client) HandleRecipient(msg Message)

func (*Client) HandleReset

func (client *Client) HandleReset(msg Message)

func (*Client) HandleStartTLS

func (client *Client) HandleStartTLS(msg Message)

func (*Client) ReadMessage

func (c *Client) ReadMessage() (Message, error)

func (*Client) Reply

func (c *Client) Reply(status int, m string) (int, error)

func (*Client) ReplyCode

func (c *Client) ReplyCode(status int) (int, error)

func (*Client) Reset

func (client *Client) Reset()

type Message

type Message struct {
	Command   string
	Arguments []string
}

func ParseMessage

func ParseMessage(s string) (Message, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL