connection

package
v0.0.0-...-492dbc3 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Connect() error
	Login() error
	Send(cmd string) error
	Join(channel string) error
	Receive() error
	SaveMessage(message *messages.Message)
}

func NewIRCClient

func NewIRCClient(nick, name, server string) Client

type IRCClient

type IRCClient struct {
	Nick        string
	Name        string
	Server      string
	LastMessage *messages.Message
	Connection  *net.Conn
}

func (*IRCClient) Connect

func (i *IRCClient) Connect() error

func (*IRCClient) Join

func (i *IRCClient) Join(channel string) error

func (*IRCClient) Login

func (i *IRCClient) Login() error

Login set the nick and user information into the server.

func (*IRCClient) Pong

func (i *IRCClient) Pong(ping string) error

Pong a handler for the PING command.

func (*IRCClient) Receive

func (i *IRCClient) Receive() error

func (*IRCClient) SaveMessage

func (i *IRCClient) SaveMessage(message *messages.Message)

func (*IRCClient) Send

func (i *IRCClient) Send(cmd string) error

Jump to

Keyboard shortcuts

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