Documentation ¶
Overview ¶
Package server ...
Index ¶
- func InitSession(sessionServer *SessionServer, streamConn *adapter.StreamConn, ...)
- type Channel
- type Server
- func (p *Server) AddService(name string, service *rpc.Service, data rpc.Map) *Server
- func (p *Server) BuildReplyCache() *base.Error
- func (p *Server) Close() bool
- func (p *Server) IsRunning() bool
- func (p *Server) Listen(network string, addr string, tlsConfig *tls.Config) *Server
- func (p *Server) ListenWithDebug(network string, addr string, tlsConfig *tls.Config) *Server
- func (p *Server) Open() bool
- type ServerConfig
- func (p *ServerConfig) SetCloseTimeout(closeTimeout time.Duration) *ServerConfig
- func (p *ServerConfig) SetLogFile(logFile string) *ServerConfig
- func (p *ServerConfig) SetLogLevel(logLevel base.ErrorLevel) *ServerConfig
- func (p *ServerConfig) SetLogToScreen(logToScreen bool) *ServerConfig
- func (p *ServerConfig) SetMaxCallDepth(maxCallDepth int16) *ServerConfig
- func (p *ServerConfig) SetMaxNodeDepth(maxNodeDepth int16) *ServerConfig
- func (p *ServerConfig) SetNumOfThreads(numOfThreads int) *ServerConfig
- func (p *ServerConfig) SetSession(session *SessionConfig) *ServerConfig
- func (p *ServerConfig) SetThreadBufferSize(threadBufferSize uint32) *ServerConfig
- func (p *ServerConfig) SetactionCache(actionCache rpc.ActionCache) *ServerConfig
- type Session
- func (p *Session) OnConnClose(_ *adapter.StreamConn)
- func (p *Session) OnConnError(streamConn *adapter.StreamConn, err *base.Error)
- func (p *Session) OnConnOpen(streamConn *adapter.StreamConn)
- func (p *Session) OnConnReadStream(streamConn *adapter.StreamConn, stream *rpc.Stream)
- func (p *Session) OutStream(stream *rpc.Stream)
- func (p *Session) TimeCheck(nowNS int64)
- type SessionConfig
- func (p *SessionConfig) SetHeartbeatInterval(heartbeatInterval time.Duration) *SessionConfig
- func (p *SessionConfig) SetHeartbeatTimeout(heartbeatTimeout time.Duration) *SessionConfig
- func (p *SessionConfig) SetNumOfChannels(numOfChannels int) *SessionConfig
- func (p *SessionConfig) SetServerCacheTimeout(serverCacheTimeout time.Duration) *SessionConfig
- func (p *SessionConfig) SetServerMaxSessions(serverMaxSessions int) *SessionConfig
- func (p *SessionConfig) SetServerReadBufferSize(serverReadBufferSize int) *SessionConfig
- func (p *SessionConfig) SetServerSessionTimeout(serverSessionTimeout time.Duration) *SessionConfig
- func (p *SessionConfig) SetServerWriteBufferSize(serverWriteBufferSize int) *SessionConfig
- func (p *SessionConfig) SetTransLimit(transLimit int) *SessionConfig
- type SessionPool
- type SessionServer
- func (p *SessionServer) AddSession(session *Session) bool
- func (p *SessionServer) Close()
- func (p *SessionServer) CreateSessionID() uint64
- func (p *SessionServer) GetSession(id uint64) (*Session, bool)
- func (p *SessionServer) OnConnClose(_ *adapter.StreamConn)
- func (p *SessionServer) OnConnError(streamConn *adapter.StreamConn, err *base.Error)
- func (p *SessionServer) OnConnOpen(_ *adapter.StreamConn)
- func (p *SessionServer) OnConnReadStream(streamConn *adapter.StreamConn, stream *rpc.Stream)
- func (p *SessionServer) Open()
- func (p *SessionServer) OutStream(stream *rpc.Stream)
- func (p *SessionServer) TimeCheck(nowNS int64)
- func (p *SessionServer) TotalSessions() int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitSession ¶ added in v0.0.2
func InitSession( sessionServer *SessionServer, streamConn *adapter.StreamConn, stream *rpc.Stream, )
InitSession ...
Types ¶
type Channel ¶ added in v0.0.2
type Channel struct {
// contains filtered or unexported fields
}
Channel ...
type Server ¶
Server ...
func (*Server) AddService ¶
AddService ...
func (*Server) ListenWithDebug ¶
ListenWithDebug ...
type ServerConfig ¶ added in v0.0.2
type ServerConfig struct {
// contains filtered or unexported fields
}
func GetDefaultServerConfig ¶ added in v0.0.2
func GetDefaultServerConfig() *ServerConfig
func (*ServerConfig) SetCloseTimeout ¶ added in v0.0.2
func (p *ServerConfig) SetCloseTimeout( closeTimeout time.Duration, ) *ServerConfig
func (*ServerConfig) SetLogFile ¶ added in v0.0.2
func (p *ServerConfig) SetLogFile(logFile string) *ServerConfig
func (*ServerConfig) SetLogLevel ¶ added in v0.0.2
func (p *ServerConfig) SetLogLevel(logLevel base.ErrorLevel) *ServerConfig
func (*ServerConfig) SetLogToScreen ¶ added in v0.0.2
func (p *ServerConfig) SetLogToScreen(logToScreen bool) *ServerConfig
func (*ServerConfig) SetMaxCallDepth ¶ added in v0.0.2
func (p *ServerConfig) SetMaxCallDepth(maxCallDepth int16) *ServerConfig
func (*ServerConfig) SetMaxNodeDepth ¶ added in v0.0.2
func (p *ServerConfig) SetMaxNodeDepth(maxNodeDepth int16) *ServerConfig
func (*ServerConfig) SetNumOfThreads ¶ added in v0.0.2
func (p *ServerConfig) SetNumOfThreads(numOfThreads int) *ServerConfig
func (*ServerConfig) SetSession ¶ added in v0.0.2
func (p *ServerConfig) SetSession(session *SessionConfig) *ServerConfig
func (*ServerConfig) SetThreadBufferSize ¶ added in v0.0.2
func (p *ServerConfig) SetThreadBufferSize( threadBufferSize uint32, ) *ServerConfig
func (*ServerConfig) SetactionCache ¶ added in v0.0.2
func (p *ServerConfig) SetactionCache( actionCache rpc.ActionCache, ) *ServerConfig
type Session ¶ added in v0.0.2
Session ...
func (*Session) OnConnClose ¶ added in v0.0.2
func (p *Session) OnConnClose(_ *adapter.StreamConn)
OnConnClose ...
func (*Session) OnConnError ¶ added in v0.0.2
func (p *Session) OnConnError(streamConn *adapter.StreamConn, err *base.Error)
OnConnError ...
func (*Session) OnConnOpen ¶ added in v0.0.2
func (p *Session) OnConnOpen(streamConn *adapter.StreamConn)
OnConnOpen ...
func (*Session) OnConnReadStream ¶ added in v0.0.2
func (p *Session) OnConnReadStream( streamConn *adapter.StreamConn, stream *rpc.Stream, )
OnConnReadStream ...
type SessionConfig ¶ added in v0.0.2
type SessionConfig struct {
// contains filtered or unexported fields
}
SessionConfig ...
func GetDefaultSessionConfig ¶ added in v0.0.2
func GetDefaultSessionConfig() *SessionConfig
GetDefaultSessionConfig ...
func (*SessionConfig) SetHeartbeatInterval ¶ added in v0.0.2
func (p *SessionConfig) SetHeartbeatInterval( heartbeatInterval time.Duration, ) *SessionConfig
func (*SessionConfig) SetHeartbeatTimeout ¶ added in v0.0.2
func (p *SessionConfig) SetHeartbeatTimeout( heartbeatTimeout time.Duration, ) *SessionConfig
func (*SessionConfig) SetNumOfChannels ¶ added in v0.0.2
func (p *SessionConfig) SetNumOfChannels(numOfChannels int) *SessionConfig
func (*SessionConfig) SetServerCacheTimeout ¶ added in v0.0.2
func (p *SessionConfig) SetServerCacheTimeout( serverCacheTimeout time.Duration, ) *SessionConfig
func (*SessionConfig) SetServerMaxSessions ¶ added in v0.0.2
func (p *SessionConfig) SetServerMaxSessions( serverMaxSessions int, ) *SessionConfig
func (*SessionConfig) SetServerReadBufferSize ¶ added in v0.0.2
func (p *SessionConfig) SetServerReadBufferSize( serverReadBufferSize int, ) *SessionConfig
func (*SessionConfig) SetServerSessionTimeout ¶ added in v0.0.2
func (p *SessionConfig) SetServerSessionTimeout( serverSessionTimeout time.Duration, ) *SessionConfig
func (*SessionConfig) SetServerWriteBufferSize ¶ added in v0.0.2
func (p *SessionConfig) SetServerWriteBufferSize( serverWriteBufferSize int, ) *SessionConfig
func (*SessionConfig) SetTransLimit ¶ added in v0.0.2
func (p *SessionConfig) SetTransLimit(transLimit int) *SessionConfig
type SessionPool ¶ added in v0.0.2
SessionPool ...
func NewSessionPool ¶ added in v0.0.2
func NewSessionPool(sessionServer *SessionServer) *SessionPool
NewSessionPool ...
func (*SessionPool) Get ¶ added in v0.0.2
func (p *SessionPool) Get(id uint64) (*Session, bool)
Get ...
func (*SessionPool) TimeCheck ¶ added in v0.0.2
func (p *SessionPool) TimeCheck(nowNS int64)
TimeCheck ...
type SessionServer ¶ added in v0.0.2
SessionServer ...
func NewSessionServer ¶ added in v0.0.2
func NewSessionServer( listeners []*listener, config *SessionConfig, streamReceiver rpc.IStreamReceiver, ) *SessionServer
SessionServer ...
func (*SessionServer) AddSession ¶ added in v0.0.2
func (p *SessionServer) AddSession(session *Session) bool
AddSession ...
func (*SessionServer) CreateSessionID ¶ added in v0.0.2
func (p *SessionServer) CreateSessionID() uint64
CreateSessionID ...
func (*SessionServer) GetSession ¶ added in v0.0.2
func (p *SessionServer) GetSession(id uint64) (*Session, bool)
GetSession ...
func (*SessionServer) OnConnClose ¶ added in v0.0.2
func (p *SessionServer) OnConnClose(_ *adapter.StreamConn)
OnConnClose ...
func (*SessionServer) OnConnError ¶ added in v0.0.2
func (p *SessionServer) OnConnError(streamConn *adapter.StreamConn, err *base.Error)
OnConnError ...
func (*SessionServer) OnConnOpen ¶ added in v0.0.2
func (p *SessionServer) OnConnOpen(_ *adapter.StreamConn)
OnConnOpen ...
func (*SessionServer) OnConnReadStream ¶ added in v0.0.2
func (p *SessionServer) OnConnReadStream( streamConn *adapter.StreamConn, stream *rpc.Stream, )
OnConnReadStream ...
func (*SessionServer) OutStream ¶ added in v0.0.2
func (p *SessionServer) OutStream(stream *rpc.Stream)
OutStream ...
func (*SessionServer) TimeCheck ¶ added in v0.0.2
func (p *SessionServer) TimeCheck(nowNS int64)
TimeCheck ...
func (*SessionServer) TotalSessions ¶ added in v0.0.2
func (p *SessionServer) TotalSessions() int64
TotalSessions ...
Click to show internal directories.
Click to hide internal directories.