Documentation ¶
Index ¶
- type Handler
- func (h *Handler) HandleCWD(args []string)
- func (h *Handler) HandleLIST(args []string)
- func (h *Handler) HandlePASS(args []string)
- func (h *Handler) HandlePORT(args []string)
- func (h *Handler) HandlePWD(args []string)
- func (h *Handler) HandleQUIT(args []string)
- func (h *Handler) HandleRETR(args []string)
- func (h *Handler) HandleUSER(args []string)
- func (h *Handler) Serve()
- func (h *Handler) WriteLine(text string)
- func (h *Handler) WriteMessage(code int, format string, args ...interface{})
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct { Conn net.Conn User string Path string Auth bool Clnt string Quit chan bool Text chan string Port string }
Handler represents FTP commands handler for client connection.
func NewHandler ¶
NewHandler returns initialized FTP commands handler for client.
func (*Handler) HandleLIST ¶
HandleLIST lists current working directory.
func (*Handler) HandlePASS ¶
HandlePASS checks that password is valid for provided user.
func (*Handler) HandlePORT ¶
HandlePORT parses provided remote address for connection.
func (*Handler) HandleQUIT ¶
HandleQUIT close user connection.
func (*Handler) HandleRETR ¶
HandleRETR transfers file to client.
func (*Handler) HandleUSER ¶
HandleUSER checks that use exists
func (*Handler) WriteMessage ¶
WriteMessage creates FTP message with required code and text.
Click to show internal directories.
Click to hide internal directories.