nntp

package
v0.0.0-...-fcbe93e Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2016 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

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) 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

func (*Conn) SwitchGroup

func (n *Conn) SwitchGroup(group string) error

SwitchGroup will change the current group, using the supplied group name. It returns an error, if any

Jump to

Keyboard shortcuts

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