nntp

package
v0.0.0-...-4deb2f9 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2017 License: BSD-3-Clause Imports: 4 Imported by: 2

Documentation

Overview

Package nntp provides some common operations on nntp server, mostly for binary downloading

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyClosed = errors.New("conn already closed")

Functions

This section is empty.

Types

type Conn

type Conn struct {
	*textproto.Conn
	// contains filtered or unexported fields
}

Conn represents a NNTP connection

func Dial

func Dial(address, user, pass string) (*Conn, error)

Dial will establish a connection to a NNTP server. It returns the connection and an error, if any

func DialTLS

func DialTLS(address, user, pass string) (*Conn, error)

func (*Conn) Close

func (n *Conn) Close() error

func (*Conn) GetMessage

func (n *Conn) GetMessage(msgId string) ([]byte, error)

GetMessage will retrieve a message from the server, using the supplied msgId. It returns the contents of the message and an error, if any

Jump to

Keyboard shortcuts

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