protonmdc

package
v0.0.0-...-ece3ee3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package protonmdc provides a NMDC connection implementation.

Index

Constants

This section is empty.

Variables

View Source
var ReNmdcAddress = regexp.MustCompile("^(" + protocommon.ReStrIP + "):(" + protocommon.ReStrPort + ")$")

ReNmdcAddress is the regex to parse a NMDC address.

View Source
var ReNmdcCommand = regexp.MustCompile(`(?s)^\$([a-zA-Z0-9:]+)( (.+))?$`)

ReNmdcCommand is the regex to parse a NMDC command

Functions

This section is empty.

Types

type Conn

type Conn struct {
	*protocommon.BaseConn
}

Conn is a NMDC connection.

func NewConn

func NewConn(logLevel log.Level, remoteLabel string, nconn net.Conn,
	applyReadTimeout bool, applyWriteTimeout bool,
) *Conn

NewConn allocates a Conn.

func (*Conn) Read

func (p *Conn) Read() (protocommon.MsgDecodable, error)

Read reads a message.

func (*Conn) Write

func (p *Conn) Write(msg protocommon.MsgEncodable)

Write writes a message.

type NmdcKeepAlive

type NmdcKeepAlive struct{}

NmdcKeepAlive is a NMDC keepalive.

Jump to

Keyboard shortcuts

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