Documentation
¶
Index ¶
- type ServerHTTP
- type ServerRPC
- func (T *ServerRPC) Close() error
- func (T *ServerRPC) HandleHTTP(rpcPath, debugPath string)
- func (T *ServerRPC) ListenAndServe() error
- func (T *ServerRPC) Register(value interface{})
- func (T *ServerRPC) RegisterName(name string, rcvr interface{}) error
- func (T *ServerRPC) Serve(l net.Listener) error
- type ServerTLSFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServerHTTP ¶
type ServerHTTP struct { *http.Server // HTTP Addr string // 监听地址 Route *vweb.Route // 路由表 // contains filtered or unexported fields }
ServerHTTP 服务器HTTP
func (*ServerHTTP) ListenAndServe ¶
func (T *ServerHTTP) ListenAndServe() error
ListenAndServe 监听并启动
error 错误
func (*ServerHTTP) LoadTLS ¶
func (T *ServerHTTP) LoadTLS(config *tls.Config, files []ServerTLSFile) error
LoadTLS 加载证书文件
config *tls.Config 证书配置 files []ServerTLSFile 证书文件
type ServerRPC ¶
type ServerRPC struct { *rpc.Server // RPC Addr string // 地址 // contains filtered or unexported fields }
ServerRPC 服务器,这个一个RPC服务器,客户端可以调用绑定的方法。
func (*ServerRPC) Register ¶
func (T *ServerRPC) Register(value interface{})
Register 注册解析类型
value interface{} 注册类型
func (*ServerRPC) RegisterName ¶
RegisterName 注册一个struct,让客户端进行访问。
name string 包名 rcvr interface{} 结构对象 error 错误
type ServerTLSFile ¶
type ServerTLSFile struct {
CertFile, KeyFile string // 证书,key 文件地址
}
Click to show internal directories.
Click to hide internal directories.