protoadc

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: 12 Imported by: 0

Documentation

Overview

Package protoadc provides an ADC connection implementation.

Index

Constants

View Source
const (
	AdcCodeProtocolUnsupported = 41
	AdcCodeFileNotAvailable    = 51
	AdcCodeSlotsFull           = 53
)

standard ADC status codes.

Variables

This section is empty.

Functions

func AdcCertFingerprint

func AdcCertFingerprint(cert *x509.Certificate) string

AdcCertFingerprint returns the fingerprint of a certificate.

func AdcRandomToken

func AdcRandomToken() string

AdcRandomToken returns a random token.

Types

type AdcBInfos

type AdcBInfos struct {
	Pkt *adc.BroadcastPacket
	Msg *adc.UserInfo
}

AdcBInfos is the BINF message.

type AdcBMessage

type AdcBMessage struct {
	Pkt *adc.BroadcastPacket
	Msg *adc.ChatMessage
}

AdcBMessage is the BMSG message.

type AdcBSearchRequest

type AdcBSearchRequest struct {
	Pkt *adc.BroadcastPacket
	Msg *adc.SearchRequest
}

AdcBSearchRequest is the BSCH message.

type AdcCGetFile

type AdcCGetFile struct {
	Pkt *adc.ClientPacket
	Msg *adc.GetRequest
}

AdcCGetFile is the CGET message.

type AdcCInfos

type AdcCInfos struct {
	Pkt *adc.ClientPacket
	Msg *adc.UserInfo
}

AdcCInfos is the CINF message.

type AdcCSendFile

type AdcCSendFile struct {
	Pkt *adc.ClientPacket
	Msg *adc.GetResponse
}

AdcCSendFile is the CSNF message.

type AdcCStatus

type AdcCStatus struct {
	Pkt *adc.ClientPacket
	Msg *adc.Status
}

AdcCStatus is the CSTA message.

type AdcCSupports

type AdcCSupports struct {
	Pkt *adc.ClientPacket
	Msg *adc.Supported
}

AdcCSupports is the CSUP message.

type AdcDConnectToMe

type AdcDConnectToMe struct {
	Pkt *adc.DirectPacket
	Msg *adc.ConnectRequest
}

AdcDConnectToMe is the DCTM message.

type AdcDMessage

type AdcDMessage struct {
	Pkt *adc.DirectPacket
	Msg *adc.ChatMessage
}

AdcDMessage is the DMSG message.

type AdcDRevConnectToMe

type AdcDRevConnectToMe struct {
	Pkt *adc.DirectPacket
	Msg *adc.RevConnectRequest
}

AdcDRevConnectToMe is the DRCM message.

type AdcDSearchResult

type AdcDSearchResult struct {
	Pkt *adc.DirectPacket
	Msg *adc.SearchResult
}

AdcDSearchResult is the DRES message.

type AdcDStatus

type AdcDStatus struct {
	Pkt *adc.DirectPacket
	Msg *adc.Status
}

AdcDStatus is the DSTA message.

type AdcFSearchRequest

type AdcFSearchRequest struct {
	Pkt *adc.FeaturePacket
	Msg *adc.SearchRequest
}

AdcFSearchRequest is the FSCH message.

type AdcHPass

type AdcHPass struct {
	Pkt *adc.HubPacket
	Msg *adc.Password
}

AdcHPass is the HPAS message.

type AdcHSupports

type AdcHSupports struct {
	Pkt *adc.HubPacket
	Msg *adc.Supported
}

AdcHSupports is the HSUP message.

type AdcICommand

type AdcICommand struct {
	Pkt *adc.InfoPacket
	Msg *adc.UserCommand
}

AdcICommand is the ICMD message.

type AdcIGetPass

type AdcIGetPass struct {
	Pkt *adc.InfoPacket
	Msg *adc.GetPassword
}

AdcIGetPass is the IGPA message.

type AdcIInfos

type AdcIInfos struct {
	Pkt *adc.InfoPacket
	Msg *adc.HubInfo
}

AdcIInfos is the IINF message.

type AdcIMsg

type AdcIMsg struct {
	*adc.InfoPacket
	Msg *adc.ChatMessage
}

AdcIMsg is the IMSG message.

type AdcIQuit

type AdcIQuit struct {
	Pkt *adc.InfoPacket
	Msg *adc.Disconnect
}

AdcIQuit is the IQUI message.

type AdcISessionID

type AdcISessionID struct {
	Pkt *adc.InfoPacket
	Msg *adc.SIDAssign
}

AdcISessionID is the ISID message.

type AdcIStatus

type AdcIStatus struct {
	Pkt *adc.InfoPacket
	Msg *adc.Status
}

AdcIStatus is the ISTA message.

type AdcISupports

type AdcISupports struct {
	*adc.InfoPacket
	Msg *adc.Supported
}

AdcISupports is the ISUP message.

type AdcIZon

type AdcIZon struct {
	Pkt *adc.InfoPacket
	Msg *adc.ZOn
}

AdcIZon is the IZON message.

type AdcKeepAlive

type AdcKeepAlive struct{}

AdcKeepAlive is an ADC keepalive.

func (*AdcKeepAlive) AdcKeyEncode

func (*AdcKeepAlive) AdcKeyEncode() string

AdcKeyEncode implements adc.Message.

func (*AdcKeepAlive) AdcTypeEncode

func (*AdcKeepAlive) AdcTypeEncode(keyEncoded string) string

AdcTypeEncode implements adc.Message.

type AdcUSearchResult

type AdcUSearchResult struct {
	Pkt *adc.UDPPacket
	Msg *adc.SearchResult
}

AdcUSearchResult is the URES message.

type Conn

type Conn struct {
	*protocommon.BaseConn
}

Conn is an ADC 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(pktMsg protocommon.MsgEncodable)

Write writes a message.

Jump to

Keyboard shortcuts

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