Documentation ¶
Index ¶
- type Packet
- type UDSConnectionClosedEventHandle
- type UDSConnectionOpenedEventHandle
- type UDSConnectionReceivePacketEventHandle
- type UnixDomainSocket
- func (slf *UnixDomainSocket) Close()
- func (slf *UnixDomainSocket) GetData(key string) any
- func (slf *UnixDomainSocket) IsConnected() bool
- func (slf UnixDomainSocket) OnUDSConnectionClosedEvent(conn *UnixDomainSocket, err any)
- func (slf UnixDomainSocket) OnUDSConnectionOpenedEvent(conn *UnixDomainSocket)
- func (slf UnixDomainSocket) OnUDSConnectionReceivePacketEvent(conn *UnixDomainSocket, packet server.Packet)
- func (slf UnixDomainSocket) RegUDSConnectionClosedEvent(handle UDSConnectionClosedEventHandle)
- func (slf UnixDomainSocket) RegUDSConnectionOpenedEvent(handle UDSConnectionOpenedEventHandle)
- func (slf UnixDomainSocket) RegUDSConnectionReceivePacketEvent(handle UDSConnectionReceivePacketEventHandle)
- func (slf *UnixDomainSocket) Run() error
- func (slf *UnixDomainSocket) SetData(key string, value any)
- func (slf *UnixDomainSocket) Write(packet server.Packet)
- type Websocket
- func (slf *Websocket) Close()
- func (slf *Websocket) GetData(key string) any
- func (slf *Websocket) IsConnected() bool
- func (slf Websocket) OnWebsocketConnectionClosedEvent(conn *Websocket, err any)
- func (slf Websocket) OnWebsocketConnectionOpenedEvent(conn *Websocket)
- func (slf Websocket) OnWebsocketConnectionReceivePacketEvent(conn *Websocket, packet server.Packet)
- func (slf Websocket) RegWebsocketConnectionClosedEvent(handle WebsocketConnectionClosedEventHandle)
- func (slf Websocket) RegWebsocketConnectionOpenedEvent(handle WebsocketConnectionOpenedEventHandle)
- func (slf Websocket) RegWebsocketConnectionReceivePacketEvent(handle WebsocketConnectionReceivePacketEventHandle)
- func (slf *Websocket) Run() error
- func (slf *Websocket) SetData(key string, value any)
- func (slf *Websocket) Write(packet server.Packet)
- type WebsocketConnectionClosedEventHandle
- type WebsocketConnectionOpenedEventHandle
- type WebsocketConnectionReceivePacketEventHandle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UDSConnectionClosedEventHandle ¶ added in v0.0.31
type UDSConnectionClosedEventHandle func(conn *UnixDomainSocket, err any)
type UDSConnectionOpenedEventHandle ¶ added in v0.0.31
type UDSConnectionOpenedEventHandle func(conn *UnixDomainSocket)
type UDSConnectionReceivePacketEventHandle ¶ added in v0.0.31
type UDSConnectionReceivePacketEventHandle func(conn *UnixDomainSocket, packet server.Packet)
type UnixDomainSocket ¶ added in v0.0.31
type UnixDomainSocket struct {
// contains filtered or unexported fields
}
UnixDomainSocket unix domain socket 客户端
func NewUnixDomainSocket ¶ added in v0.0.31
func NewUnixDomainSocket(addr string) *UnixDomainSocket
NewUnixDomainSocket 创建 unix domain socket 客户端
func (*UnixDomainSocket) GetData ¶ added in v0.0.31
func (slf *UnixDomainSocket) GetData(key string) any
GetData 获取数据
func (*UnixDomainSocket) IsConnected ¶ added in v0.0.31
func (slf *UnixDomainSocket) IsConnected() bool
IsConnected 是否已连接
func (UnixDomainSocket) OnUDSConnectionClosedEvent ¶ added in v0.0.31
func (slf UnixDomainSocket) OnUDSConnectionClosedEvent(conn *UnixDomainSocket, err any)
func (UnixDomainSocket) OnUDSConnectionOpenedEvent ¶ added in v0.0.31
func (slf UnixDomainSocket) OnUDSConnectionOpenedEvent(conn *UnixDomainSocket)
func (UnixDomainSocket) OnUDSConnectionReceivePacketEvent ¶ added in v0.0.31
func (slf UnixDomainSocket) OnUDSConnectionReceivePacketEvent(conn *UnixDomainSocket, packet server.Packet)
func (UnixDomainSocket) RegUDSConnectionClosedEvent ¶ added in v0.0.31
func (slf UnixDomainSocket) RegUDSConnectionClosedEvent(handle UDSConnectionClosedEventHandle)
RegUDSConnectionClosedEvent 注册连接关闭事件
func (UnixDomainSocket) RegUDSConnectionOpenedEvent ¶ added in v0.0.31
func (slf UnixDomainSocket) RegUDSConnectionOpenedEvent(handle UDSConnectionOpenedEventHandle)
RegUDSConnectionOpenedEvent 注册连接打开事件
func (UnixDomainSocket) RegUDSConnectionReceivePacketEvent ¶ added in v0.0.31
func (slf UnixDomainSocket) RegUDSConnectionReceivePacketEvent(handle UDSConnectionReceivePacketEventHandle)
RegUDSConnectionReceivePacketEvent 注册连接接收数据包事件
func (*UnixDomainSocket) SetData ¶ added in v0.0.31
func (slf *UnixDomainSocket) SetData(key string, value any)
SetData 设置数据
func (*UnixDomainSocket) Write ¶ added in v0.0.31
func (slf *UnixDomainSocket) Write(packet server.Packet)
Write 向连接中写入数据
type Websocket ¶
type Websocket struct {
// contains filtered or unexported fields
}
Websocket websocket 客户端
func (Websocket) OnWebsocketConnectionClosedEvent ¶ added in v0.0.31
func (Websocket) OnWebsocketConnectionOpenedEvent ¶ added in v0.0.31
func (slf Websocket) OnWebsocketConnectionOpenedEvent(conn *Websocket)
func (Websocket) OnWebsocketConnectionReceivePacketEvent ¶ added in v0.0.31
func (Websocket) RegWebsocketConnectionClosedEvent ¶ added in v0.0.31
func (slf Websocket) RegWebsocketConnectionClosedEvent(handle WebsocketConnectionClosedEventHandle)
RegWebsocketConnectionClosedEvent 注册连接关闭事件
func (Websocket) RegWebsocketConnectionOpenedEvent ¶ added in v0.0.31
func (slf Websocket) RegWebsocketConnectionOpenedEvent(handle WebsocketConnectionOpenedEventHandle)
RegWebsocketConnectionOpenedEvent 注册连接打开事件
func (Websocket) RegWebsocketConnectionReceivePacketEvent ¶ added in v0.0.31
func (slf Websocket) RegWebsocketConnectionReceivePacketEvent(handle WebsocketConnectionReceivePacketEventHandle)
RegWebsocketConnectionReceivePacketEvent 注册连接接收数据包事件
type WebsocketConnectionClosedEventHandle ¶ added in v0.0.31
type WebsocketConnectionOpenedEventHandle ¶ added in v0.0.31
type WebsocketConnectionOpenedEventHandle func(conn *Websocket)
type WebsocketConnectionReceivePacketEventHandle ¶ added in v0.0.31
Click to show internal directories.
Click to hide internal directories.