Documentation
¶
Index ¶
Constants ¶
View Source
const CLIENT_ALREADY_EXISTS = 10
View Source
const INVALID_NAME = 20
View Source
const SERVER_ERROR = 50
View Source
const TEXT_MESSAGE = 1
View Source
const USER_NAME_PWRD_DONT_MATCH = 21
Variables ¶
View Source
var ERR_NOT_LOGIN = errors.New("You are not logged in.")
Functions ¶
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func New ¶
func New(client connections.Client, socket Socket) *Connection
func NewWithNewClient ¶
func NewWithNewClient(factory connections.ClientFactory, name string, socket Socket) *Connection
func (*Connection) Close ¶
func (con *Connection) Close()
func (*Connection) HandleCommand ¶
func (c *Connection) HandleCommand(cmd *Input) connections.Response
func (*Connection) SendMessage ¶
func (con *Connection) SendMessage(m message.Message)
type Options ¶
type Options struct { RoomList *room.RoomList ChatLog io.Writer DataFactory clientdata.Factory ClientFactory connections.ClientFactory }
Click to show internal directories.
Click to hide internal directories.