irctest

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Handler irc.Handler
	// contains filtered or unexported fields
}

func NewServer

func NewServer() *Server

NewServer creates a new mock irc server that implements io.ReadWriteCloser. Don't forget to close.

func (*Server) Close

func (s *Server) Close() error

func (*Server) Read

func (s *Server) Read(p []byte) (int, error)

Read is how the client reads lines from the server

func (*Server) Write

func (s *Server) Write(p []byte) (int, error)

Write is how a client sends messages to the server

func (*Server) WriteMessage

func (s *Server) WriteMessage(m encoding.TextMarshaler)

WriteMessage sends messages from the server to the client

func (*Server) WriteString

func (s *Server) WriteString(str string)

WriteString sends messages to the client.

Jump to

Keyboard shortcuts

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