client

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name string
	Ext  []string
}

type Conn

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

Conn represents a Client-to-Hub connection.

func DialHub

func DialHub(addr string, info *Config) (*Conn, error)

DialHub connects to a hub and runs a handshake.

func HubHandshake

func HubHandshake(conn *nmdc.Conn, conf *Config) (*Conn, error)

HubHandshake begins a Client-Hub handshake on a connection.

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) HubInfo

func (c *Conn) HubInfo() HubInfo

func (*Conn) OnChatMessage

func (c *Conn) OnChatMessage(fnc func(m *nmdcp.ChatMessage) error)

func (*Conn) OnUnhandled

func (c *Conn) OnUnhandled(fnc func(m nmdcp.Message) error)

func (*Conn) OnlinePeers

func (c *Conn) OnlinePeers() []*Peer

func (*Conn) SendChatMsg

func (c *Conn) SendChatMsg(msg string) error

type HubInfo

type HubInfo struct {
	Name  string
	Topic string
}

type Peer

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

func (*Peer) Info

func (p *Peer) Info() nmdcp.MyINFO

func (*Peer) IsBot

func (p *Peer) IsBot() bool

func (*Peer) IsOp

func (p *Peer) IsOp() bool

Jump to

Keyboard shortcuts

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