simplenntp

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2014 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

func Dial

func Dial(address string, port int, useTLS bool, insecureSSL bool, tdchan chan *TimeData) (*Conn, error)

Dial connects to an NNTP server

func (*Conn) Authenticate

func (c *Conn) Authenticate(username, password string) error

Authenticate logs in to the NNTP server. It only sends the password if the server requires one.

func (*Conn) Post

func (c *Conn) Post(p []byte, chunkSize int64) error

Post posts an article

func (*Conn) Quit

func (c *Conn) Quit() error

Quit sends the QUIT command and closes the connection to the server.

type Error

type Error struct {
	Code uint
	Msg  string
}

An Error represents an error response from an NNTP server.

func (Error) Error

func (e Error) Error() string

type ProtocolError

type ProtocolError string

A ProtocolError represents responses from an NNTP server that seem incorrect for NNTP.

func (ProtocolError) Error

func (p ProtocolError) Error() string

type TimeData

type TimeData struct {
	Milliseconds int64
	Bytes        int
}

Jump to

Keyboard shortcuts

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