import "github.com/byte-mug/fastnntp-backend2/remote/nntpclient"
Minimalistic Pipelined NNTP client.
const ( CheckOK = 238 // Send article to be transferred CheckNotPossible = 431 // Transfer not possible; try again later CheckNotWanted = 438 // Article not wanted TakethisOK = 239 TakethisRejected = 439 )
-
func FinishDR(dr *fastnntp.DotReader)
-
type Connection struct { // contains filtered or unexported fields }
-
func NewConnection(rwc io.ReadWriteCloser) (c *Connection, err error)
-
func (c *Connection) Article(args []byte, head, body bool, f func(dr *fastnntp.DotReader, msgid []byte)) (err error)
Submits one of the following commands: ARTICLE, HEAD, BODY or STAT.
func (c *Connection) ArticleInto(args []byte, head, body bool, t io.Writer) (msgid []byte, err error)
Submits one of the following commands: ARTICLE, HEAD, BODY or STAT.
func (c *Connection) Check(msgid []byte) (code int, err error)
Checks whether or not an article is wanted. Requires RFC-4644 (The STREAMING Extension)
func (c *Connection) Close() (err error)
Closes the connection. Handle with care: Any further attempt to perform a request panics after the connection is closed using Close().
func (c *Connection) Group(grp []byte) (num, low, high int64, err error)
Selects a newsgroup.
func (c *Connection) ListActive(f func(group []byte, high, low int64, status byte)) (err error)
List all newsgroups.
func (c *Connection) ListNewsgroups(f func(group []byte, descr []byte)) (err error)
List all newsgroups.
func (c *Connection) Listgroup(f func(num int64), args interface{}) (err error)
EXPERIMENTAL, MAY CHANGE! Performs the LISTGROUP command.
func (c *Connection) PostOrIhave(msgid []byte, f Posting) (err error)
-
func (c *Connection) Takethis(msgid []byte, f Posting) (code int, err error)
Posts an article using the TAKETHIS command. Requires RFC-4644 (The STREAMING Extension)
func (c *Connection) Xover(f XoverResp, msgno []byte) (err error)
Performs the XOVER command.
type ErrNum int
-
const ( EMalformedResponse ErrNum = iota EInvalidArgs )
-
func (e ErrNum) Error() (s string)
-
type Posting func(dw *fastnntp.DotWriter)
-
type UnexpectedCode struct { Expected string Got string }
-
func (u *UnexpectedCode) Error() string
-
type XoverResp func(num int64, subject, from, date, msgId, refs []byte, lng, lines int64)
-
import "fmt"
import "github.com/byte-mug/fastnntp"
import "io"
import "net/textproto"
import "regexp"
import "sync"