Documentation ¶
Index ¶
- func NewDownloader() *downloader
- type Client
- func (this *Client) Close()
- func (this *Client) Connect(network string, address string) error
- func (this *Client) Id() int
- func (this *Client) LocalAddr() net.Addr
- func (this *Client) Receive(receiver func(data []byte))
- func (this *Client) RemoteAddr() net.Addr
- func (this *Client) Write(bytes []byte)
- func (this *Client) WriteString(message string)
- func (this *Client) Writeln(message string)
- type DownloaderItem
- func (this *DownloaderItem) ContentLength() uint64
- func (this *DownloaderItem) Error() error
- func (this *DownloaderItem) File() *os.File
- func (this *DownloaderItem) IsCompleted() bool
- func (this *DownloaderItem) IsDownloading() bool
- func (this *DownloaderItem) Progress() float32
- func (this *DownloaderItem) Size() uint64
- func (this *DownloaderItem) Start()
- func (this *DownloaderItem) Success() bool
- func (this *DownloaderItem) Tag() string
- func (this *DownloaderItem) Target() string
- func (this *DownloaderItem) URL() string
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDownloader ¶
func NewDownloader() *downloader
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) RemoteAddr ¶
func (*Client) WriteString ¶
type DownloaderItem ¶
type DownloaderItem struct {
// contains filtered or unexported fields
}
func (*DownloaderItem) ContentLength ¶
func (this *DownloaderItem) ContentLength() uint64
func (*DownloaderItem) Error ¶
func (this *DownloaderItem) Error() error
func (*DownloaderItem) File ¶
func (this *DownloaderItem) File() *os.File
func (*DownloaderItem) IsCompleted ¶
func (this *DownloaderItem) IsCompleted() bool
func (*DownloaderItem) IsDownloading ¶
func (this *DownloaderItem) IsDownloading() bool
func (*DownloaderItem) Progress ¶
func (this *DownloaderItem) Progress() float32
func (*DownloaderItem) Size ¶
func (this *DownloaderItem) Size() uint64
func (*DownloaderItem) Start ¶
func (this *DownloaderItem) Start()
func (*DownloaderItem) Success ¶
func (this *DownloaderItem) Success() bool
func (*DownloaderItem) Tag ¶
func (this *DownloaderItem) Tag() string
func (*DownloaderItem) Target ¶
func (this *DownloaderItem) Target() string
func (*DownloaderItem) URL ¶
func (this *DownloaderItem) URL() string
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) AcceptClient ¶
func (*Server) CloseClient ¶
func (*Server) ReceiveClient ¶
Click to show internal directories.
Click to hide internal directories.