Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
IHandler xnetcommon.IHandler
IRemote xnetcommon.IRemote
}
Client 客户端
func NewClient ¶
func NewClient(handler xnetcommon.IHandler) *Client
type ConnectOptions ¶
type ConnectOptions struct {
xnetcommon.ConnOptions
// contains filtered or unexported fields
}
func NewConnectOptions ¶
func NewConnectOptions() *ConnectOptions
func (*ConnectOptions) WithAddress ¶
func (p *ConnectOptions) WithAddress(address string) *ConnectOptions
func (*ConnectOptions) WithIOut ¶
func (p *ConnectOptions) WithIOut(iOut xcontrol.IOut) *ConnectOptions
func (*ConnectOptions) WithSendChanCapacity ¶
func (p *ConnectOptions) WithSendChanCapacity(sendChanCapacity uint32) *ConnectOptions
type Remote ¶
type Remote struct {
Conn *websocket.Conn // 连接
*xnetcommon.DefaultRemote
}
Remote 远端
func (*Remote) Start ¶
func (p *Remote) Start(connOptions *xnetcommon.ConnOptions, iout xcontrol.IOut, handler xnetcommon.IHandler)
type Server ¶
type Server struct {
IHandler xnetcommon.IHandler
// contains filtered or unexported fields
}
Server 服务端
type ServerOptions ¶
type ServerOptions struct {
xnetcommon.ConnOptions
xnetcommon.PacketLimitOptions
// contains filtered or unexported fields
}
func (*ServerOptions) WithIOut ¶
func (p *ServerOptions) WithIOut(iOut xcontrol.IOut) *ServerOptions
func (*ServerOptions) WithListenAddress ¶
func (p *ServerOptions) WithListenAddress(listenAddress string) *ServerOptions
func (*ServerOptions) WithPattern ¶
func (p *ServerOptions) WithPattern(pattern string) *ServerOptions
func (*ServerOptions) WithSendChanCapacity ¶
func (p *ServerOptions) WithSendChanCapacity(sendChanCapacity uint32) *ServerOptions
Click to show internal directories.
Click to hide internal directories.