network

package
v0.0.0-...-c8d1825 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpService

type HttpService struct {
	Network *NetworkManager //
	// contains filtered or unexported fields
}

http

func (*HttpService) Startup

func (h *HttpService) Startup(info *common.ServiceInfo) error

启动http服务

type NetworkManager

type NetworkManager struct {
	core.MessageList // 消息列表
	// contains filtered or unexported fields
}

本模块是网络模块,开启http/protobuf端口供外部调用

func (*NetworkManager) BeginWork

func (n *NetworkManager) BeginWork()

开始工作

func (*NetworkManager) Init

func (n *NetworkManager) Init()

初始化

func (*NetworkManager) OnForeseeMessage

func (n *NetworkManager) OnForeseeMessage(msg message.BaseMessage) (done bool)

偷窥消息

func (*NetworkManager) OnForeseeResponse

func (n *NetworkManager) OnForeseeResponse(rsp message.BaseResponse) (done bool)

偷窥消息的回应

func (*NetworkManager) OnProcessMessage

func (n *NetworkManager) OnProcessMessage(msg message.BaseMessage) (rsp message.BaseResponse, err error)

处理消息

func (*NetworkManager) OnProcessResponse

func (n *NetworkManager) OnProcessResponse(rsp message.BaseResponse)

处理消息的回应

func (*NetworkManager) StopWork

func (n *NetworkManager) StopWork()

停止工作

func (*NetworkManager) Uninit

func (n *NetworkManager) Uninit()

反初始化

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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