server

package
v0.0.0-...-54413c5 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: GPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SessionModeTransit = iota
	SessionModeReader
)

Variables

View Source
var (
	Capabilities = protocol.Capabilities{
		{Type: protocol.VersionCapability, Params: "2"},
		{Type: protocol.ImplementationCapability, Params: fmt.Sprintf("%s %s", common.ServerName, common.ServerVersion)},
		{Type: protocol.OverCapability, Params: "MSGID"},
		{Type: protocol.ModeReaderCapability},
		{Type: protocol.IHaveCapability},
	}
)

Functions

This section is empty.

Types

type Handler

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

func NewHandler

func NewHandler(b backend.StorageBackend, serverDomain, uploadPath string) *Handler

func (*Handler) Handle

func (h *Handler) Handle(s *Session, message string, id uint) error

type NNTPServer

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

func NewNNTPServer

func NewNNTPServer(cfg config.Config) (*NNTPServer, error)

func (*NNTPServer) Start

func (ns *NNTPServer) Start() error

func (*NNTPServer) Stop

func (ns *NNTPServer) Stop()

type Session

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

func NewSession

func NewSession(
	ctx context.Context,
	conn net.Conn,
	remoteAddr string,
	caps protocol.Capabilities,
	id string,
	closed chan<- bool,
	handler *Handler,
) (*Session, error)

type SessionMode

type SessionMode int

Jump to

Keyboard shortcuts

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