Documentation ¶
Index ¶
- Constants
- Variables
- func HandleGetPlayerTokenReq(conn *KCPConn, data []byte, bypass bool) ([]byte, error)
- func HandleGetPlayerTokenRsp(conn *KCPConn, data []byte, bypass bool) ([]byte, error)
- func HandlePlayerLoginReq(conn *KCPConn, data []byte, bypass bool) ([]byte, error)
- func IsHandshakePacket(data []byte) bool
- func ToLID(conv, token uint32) uint64
- type BypassSocket
- type Handler
- type Handshake
- type KCPConn
- type KCPSocket
- type ProxyInterface
- type WriteFunc
Constants ¶
View Source
const ( HANDSHAKE_SYN = 0xff HANDSHAKE_ACK = 0x145 HANDSHAKE_FIN = 0x194 )
View Source
const BUFFER_SIZE = 4 * 1024 * 1024
Variables ¶
View Source
var ErrInvalidHandshakePacket = errors.New("invalid handshake packet")
Functions ¶
func HandleGetPlayerTokenReq ¶
func HandleGetPlayerTokenRsp ¶
func HandlePlayerLoginReq ¶
Types ¶
type BypassSocket ¶
type BypassSocket struct {
// contains filtered or unexported fields
}
func (*BypassSocket) Start ¶
func (b *BypassSocket) Start()
func (*BypassSocket) Stop ¶
func (b *BypassSocket) Stop()
type Handshake ¶
type Handshake struct {
// contains filtered or unexported fields
}
func NewHandshakePacket ¶
func ParseHandshakePacket ¶
type KCPConn ¶
type KCPConn struct {
// contains filtered or unexported fields
}
func ConstructBypassConn ¶
func ConstructKCPConn ¶
func (*KCPConn) StartBypass ¶
func (c *KCPConn) StartBypass()
type ProxyInterface ¶
type ProxyInterface interface { Start() Stop() }
func NewBypassSocket ¶
func NewKCPSocket ¶
Click to show internal directories.
Click to hide internal directories.