blob-ftp/server.go
Vasiliy Tolstov 0b1f88c1aa initial import
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
2015-04-14 03:14:38 +03:00

21 lines
278 B
Go

package main
import (
"net"
"net/textproto"
)
type Conn struct {
ctrl *textproto.Conn
data net.Conn
ln net.Listener
}
func (c *Conn) Close() error {
return c.ctrl.Close()
}
func NewServer(c net.Conn) (*Conn, error) {
return &Conn{ctrl: textproto.NewConn(c)}, nil
}