server

package
v0.0.0-...-451a7c7 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FrontClient

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

func NewPartClient

func NewPartClient(f func(client *FrontClient)) *FrontClient

func (*FrontClient) Close

func (p *FrontClient) Close() error

关闭连接

返回,error。如果关闭连接时出错,就返回错误信息,否则返回nil

func (*FrontClient) IsOpen

func (p *FrontClient) IsOpen() bool

是否打开

返回,bool。如果已连接到服务器,就返回true。

func (*FrontClient) Ping

func (p *FrontClient) Ping() bool

检查连接状态

返回,bool。如果无法访问服务器,就返回false。

func (*FrontClient) Push

func (p *FrontClient) Push(c *net.TCPConn)

func (*FrontClient) Start

func (p *FrontClient) Start() error

打开连接

返回,error。如果连接到服务器时出错,就返回错误信息,否则返回nil

type FrontService

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

处理前端业务,主要是解析ssdb请求,并发送给ssdb

func NewFrontService

func NewFrontService(count int) *FrontService

func (*FrontService) Push

func (f *FrontService) Push(c *net.TCPConn)

type SSDBProxy

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

ssdb代理

func NewSSDBProxy

func NewSSDBProxy(c *conf.ProxyConf) *SSDBProxy

func (*SSDBProxy) Close

func (s *SSDBProxy) Close()

func (*SSDBProxy) Start

func (s *SSDBProxy) Start() error

Jump to

Keyboard shortcuts

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