models

package
v0.0.0-...-45a5ef6 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2014 License: GPL-3.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 Account

type Account struct {
	Id          bson.ObjectId `bson:"_id,omitempty"`
	Username    string        `bson:"username"`
	Password    string        `bson:"password"`
	AccessLevel int8          `bson:"access_level"`
}

type Client

type Client struct {
	Account   Account
	SessionID []byte
	Socket    net.Conn
}

func NewClient

func NewClient() *Client

func (*Client) Receive

func (c *Client) Receive() (opcode byte, data []byte, e error)

func (*Client) Send

func (c *Client) Send(data []byte, params ...bool) error

type GameServer

type GameServer struct {
	Id     uint8
	Socket net.Conn
}

func NewGameServer

func NewGameServer() *GameServer

func (*GameServer) Receive

func (g *GameServer) Receive() (opcode byte, data []byte, e error)

func (*GameServer) Send

func (g *GameServer) Send(data []byte) error

Jump to

Keyboard shortcuts

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