peer

package
v0.0.0-...-73c6690 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatPeer

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

func NewChatPeer

func NewChatPeer(ip string, sourcePort int, readFrom chan MessageToSend, writeFunc OnMessageReceived) (*ChatPeer, error)

func (*ChatPeer) ConnectTo

func (p *ChatPeer) ConnectTo(dest string) error

func (*ChatPeer) GetHostId

func (p *ChatPeer) GetHostId() peer.ID

func (*ChatPeer) GetMultiaddr

func (p *ChatPeer) GetMultiaddr() string

type MessageToSend

type MessageToSend struct {
	Content     string
	ReceiverAdd string
}

type OnMessageReceived

type OnMessageReceived func(string, string)

Jump to

Keyboard shortcuts

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