Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MemoryAddress ¶
func MemoryAddress() string
func SetPort ¶
func SetPort(v int)
SetPort 设置 net socket 端口号, 如参数 "v" 非指定范围内端口则获取随机未使用端口号
v 1024 ~ 65535
func UseNetIPCChannel ¶
func UseNetIPCChannel() bool
Types ¶
type IBrowserChannel ¶
type IBrowserChannel interface { Channel(channelId int64) IChannel ChannelIds() (result []int64) Send(channelId int64, data []byte) Handler(handler IPCCallback) Close() }
func NewBrowser ¶
func NewBrowser(addresses ...string) IBrowserChannel
NewBrowser Create main(browser) process channel
type IChannel ¶
type IChannel interface { IsConnect() bool Close() // contains filtered or unexported methods }
IChannel 通道链接
type IIPCContext ¶
type IIPCContext interface { Connect() net.Conn // IPC 通道链接 ChannelId() int64 // 返回 发送通道ID ToChannelId() int64 // 返回 接收发送通道ID ChannelType() ChannelType // 返回 当前通道类型 ProcessId() CefProcessId // 返回 通道消息来源 Message() IMessage // 消息 Free() // }
IIPCContext IPC通信回调上下文
type IMessage ¶
type IMessage interface { Type() mt // 消息类型 Length() int32 // 数据长度 Data() []byte // 数据 JSON() json.JSON // 转为 JSON 对象并返回 // contains filtered or unexported methods }
IMessage 消息内容接口
type IPCContext ¶
type IPCContext struct {
// contains filtered or unexported fields
}
IPCContext IPC 上下文
func (*IPCContext) ChannelType ¶
func (m *IPCContext) ChannelType() ChannelType
ChannelType 返回当前通道类型
func (*IPCContext) ProcessId ¶
func (m *IPCContext) ProcessId() CefProcessId
type IRenderChannel ¶
type IRenderChannel interface { Channel() IChannel Send(data []byte) SendToChannel(toChannelId int64, data []byte) UpdateChannelId(toChannelId int64) Handler(handler IPCCallback) Close() }
func NewRender ¶
func NewRender(channelId int64, addresses ...string) IRenderChannel
NewRender Create the renderer process channel
param: channelId Unique channel ID identifier
Click to show internal directories.
Click to hide internal directories.