server

package
v0.0.0-...-11651c4 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NextId

func NextId() int64

Types

type ClientConfig

type ClientConfig struct {
	Name      string
	ProtoName string
	AddrList  []string
	EtcdAddrs []string
	Balancer  string
}

type FrontendConfig

type FrontendConfig struct {
	ServerId      int32 // 服务器ID
	Server80      *ServerConfig
	Server443     *ServerConfig
	Server5222    *ServerConfig
	SessionClient *ClientConfig
	AuthKeyClient *ClientConfig
}

func (*FrontendConfig) String

func (c *FrontendConfig) String() string

type FrontendServer

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

func NewFrontendServer

func NewFrontendServer(configPath string) *FrontendServer

func (*FrontendServer) Destroy

func (s *FrontendServer) Destroy()

func (*FrontendServer) Initialize

func (s *FrontendServer) Initialize() error

////////////////////////////////////////////////////////////////////////////////////////////////// AppInstance interface

func (*FrontendServer) OnClientClosed

func (s *FrontendServer) OnClientClosed(client *net2.TcpClient)

func (*FrontendServer) OnClientDataArrived

func (s *FrontendServer) OnClientDataArrived(client *net2.TcpClient, msg interface{}) error

func (*FrontendServer) OnClientTimer

func (s *FrontendServer) OnClientTimer(client *net2.TcpClient)

func (*FrontendServer) OnConnectionClosed

func (s *FrontendServer) OnConnectionClosed(conn *net2.TcpConnection)

func (*FrontendServer) OnConnectionDataArrived

func (s *FrontendServer) OnConnectionDataArrived(conn *net2.TcpConnection, msg interface{}) error

func (*FrontendServer) OnNewClient

func (s *FrontendServer) OnNewClient(client *net2.TcpClient)

////////////////////////////////////////////////////////////////////////////////////////////////// TcpClientCallBack

func (*FrontendServer) OnNewConnection

func (s *FrontendServer) OnNewConnection(conn *net2.TcpConnection)

func (*FrontendServer) RunLoop

func (s *FrontendServer) RunLoop()

type ServerConfig

type ServerConfig struct {
	Name      string
	ProtoName string
	Addr      string
}

Jump to

Keyboard shortcuts

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