server

package
v0.0.0-...-2ab1e11 Latest Latest
Warning

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

Go to latest
Published: May 1, 2015 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(name, address, port string)

Types

type Client

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

func NewClient

func NewClient(name string, conn net.Conn, s *Server) *Client

func (*Client) AwayMessage

func (c *Client) AwayMessage() string

func (*Client) Channels

func (c *Client) Channels() *channel.Channels

func (*Client) Close

func (c *Client) Close()

func (*Client) Name

func (c *Client) Name() string

func (*Client) RealName

func (c *Client) RealName() string

func (*Client) Send

func (c *Client) Send(msg message.M)

func (*Client) SendExcept

func (c *Client) SendExcept(msg message.M, name string)

func (*Client) SetAwayMessage

func (c *Client) SetAwayMessage(n string)

func (*Client) SetMode

func (c *Client) SetMode(n string)

func (*Client) SetName

func (c *Client) SetName(n string)

func (*Client) SetRealName

func (c *Client) SetRealName(n string)

func (*Client) SetUserName

func (c *Client) SetUserName(n string)

func (*Client) UserName

func (c *Client) UserName() string

type Clients

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

func NewClients

func NewClients() *Clients

func (*Clients) Add

func (cs *Clients) Add(c *Client)

func (*Clients) Broadcast

func (cs *Clients) Broadcast(msg message.M)

func (*Clients) Close

func (cs *Clients) Close()

func (*Clients) Find

func (cs *Clients) Find(name string) (*Client, bool)

func (*Clients) Len

func (cs *Clients) Len() int

func (*Clients) Names

func (cs *Clients) Names() []string

func (*Clients) Remove

func (cs *Clients) Remove(c *Client)

type Server

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

func NewServer

func NewServer(name, address, port string) *Server

func (*Server) Address

func (s *Server) Address() string

func (*Server) Find

func (s *Server) Find(name string) (message.Sender, bool)

func (*Server) FindChannel

func (s *Server) FindChannel(name string) *channel.Channel

func (*Server) Join

func (s *Server) Join(c channel.Client, channelName string) *channel.Channel

func (*Server) List

func (s *Server) List() []string

func (*Server) Name

func (s *Server) Name() string

func (*Server) Names

func (s *Server) Names() []string

func (*Server) Part

func (s *Server) Part(c channel.Client, channelName string)

func (*Server) Remove

func (s *Server) Remove(c *Client)

func (*Server) Start

func (s *Server) Start()

func (*Server) Stop

func (s *Server) Stop()

Jump to

Keyboard shortcuts

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