Documentation ¶
Index ¶
- type KcpListener
- func (l *KcpListener) Start() error
- func (l *KcpListener) WithCrypt(crypt string) *KcpListener
- func (l *KcpListener) WithDataShards(shards int) *KcpListener
- func (l *KcpListener) WithGuardian(g func(c *kcp.UDPSession, gs rua.GameServer) bool) *KcpListener
- func (l *KcpListener) WithLogger(logger rua.Logger) *KcpListener
- func (l *KcpListener) WithMaxAttempts(count int) *KcpListener
- func (l *KcpListener) WithParityShards(shards int) *KcpListener
- func (l *KcpListener) WithPeerReadTimeout(t int) *KcpListener
- func (l *KcpListener) WithPeerTag(t string) *KcpListener
- func (l *KcpListener) WithPeerWriteTimeout(t int) *KcpListener
- func (l *KcpListener) WithUpgrader(f func(c *kcp.UDPSession) (net.Conn, error)) *KcpListener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KcpListener ¶ added in v0.2.0
type KcpListener struct {
// contains filtered or unexported fields
}
func NewKcpListener ¶
func NewKcpListener(addr string, gs rua.GameServer, key []byte, bufSize int) *KcpListener
func (*KcpListener) Start ¶ added in v0.2.0
func (l *KcpListener) Start() error
func (*KcpListener) WithCrypt ¶ added in v0.2.0
func (l *KcpListener) WithCrypt(crypt string) *KcpListener
func (*KcpListener) WithDataShards ¶ added in v0.2.0
func (l *KcpListener) WithDataShards(shards int) *KcpListener
func (*KcpListener) WithGuardian ¶ added in v0.2.0
func (l *KcpListener) WithGuardian(g func(c *kcp.UDPSession, gs rua.GameServer) bool) *KcpListener
func (*KcpListener) WithLogger ¶ added in v0.2.0
func (l *KcpListener) WithLogger(logger rua.Logger) *KcpListener
func (*KcpListener) WithMaxAttempts ¶ added in v0.2.0
func (l *KcpListener) WithMaxAttempts(count int) *KcpListener
func (*KcpListener) WithParityShards ¶ added in v0.2.0
func (l *KcpListener) WithParityShards(shards int) *KcpListener
func (*KcpListener) WithPeerReadTimeout ¶ added in v0.3.0
func (l *KcpListener) WithPeerReadTimeout(t int) *KcpListener
func (*KcpListener) WithPeerTag ¶ added in v0.2.0
func (l *KcpListener) WithPeerTag(t string) *KcpListener
func (*KcpListener) WithPeerWriteTimeout ¶ added in v0.3.0
func (l *KcpListener) WithPeerWriteTimeout(t int) *KcpListener
func (*KcpListener) WithUpgrader ¶ added in v0.2.0
func (l *KcpListener) WithUpgrader(f func(c *kcp.UDPSession) (net.Conn, error)) *KcpListener
Click to show internal directories.
Click to hide internal directories.