mocks

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.6.1

type Config struct {
	PortValue           uint16
	InboundConfigValue  *ConnectionConfig
	OutboundConfigValue *ConnectionConfig
}

func (*Config) InboundConfig added in v0.6.1

func (config *Config) InboundConfig() core.ConnectionConfig

func (*Config) OutboundConfig added in v0.6.1

func (config *Config) OutboundConfig() core.ConnectionConfig

func (*Config) Port added in v0.6.1

func (config *Config) Port() uint16

type ConnectionConfig added in v0.6.1

type ConnectionConfig struct {
	ProtocolValue string
	ContentValue  []byte
}

func (*ConnectionConfig) Content added in v0.6.1

func (config *ConnectionConfig) Content() []byte

func (*ConnectionConfig) Protocol added in v0.6.1

func (config *ConnectionConfig) Protocol() string

type InboundConnectionHandler added in v0.6.1

type InboundConnectionHandler struct {
	Data2Send    []byte
	DataReturned *bytes.Buffer
	Port         uint16
	Server       *core.Point
}

func (*InboundConnectionHandler) Communicate added in v0.6.1

func (handler *InboundConnectionHandler) Communicate(packet v2net.Packet) error

func (*InboundConnectionHandler) Create added in v0.6.1

func (handler *InboundConnectionHandler) Create(point *core.Point, config []byte) (core.InboundConnectionHandler, error)

func (*InboundConnectionHandler) Listen added in v0.6.1

func (handler *InboundConnectionHandler) Listen(port uint16) error

type MockUserSet added in v0.6.1

type MockUserSet struct {
	UserIds    []user.ID
	UserHashes map[string]int
	Timestamps map[string]int64
}

func (*MockUserSet) AddUser added in v0.6.1

func (us *MockUserSet) AddUser(user user.User) error

func (*MockUserSet) GetUser added in v0.6.1

func (us *MockUserSet) GetUser(userhash []byte) (*user.ID, int64, bool)

type OutboundConnectionHandler added in v0.6.1

type OutboundConnectionHandler struct {
	Data2Send   *bytes.Buffer
	Data2Return []byte
	Destination v2net.Destination
}

func (*OutboundConnectionHandler) Create added in v0.6.1

func (handler *OutboundConnectionHandler) Create(point *core.Point, packet v2net.Packet) (core.OutboundConnectionHandler, error)

func (*OutboundConnectionHandler) Initialize added in v0.6.1

func (handler *OutboundConnectionHandler) Initialize(config []byte) error

func (*OutboundConnectionHandler) Start added in v0.6.1

func (handler *OutboundConnectionHandler) Start(ray core.OutboundRay) error

Jump to

Keyboard shortcuts

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