Documentation
¶
Index ¶
- Variables
- func WriteLegacyPacket[T packet.Packet](conn *ProxyConn, pk T, marshalFn func(io protocol.IO, pk T)) error
- type PacketData
- type ProxyConn
- func (c *ProxyConn) ClientData() login.ClientData
- func (c *ProxyConn) Close() error
- func (c *ProxyConn) IdentityData() login.IdentityData
- func (conn *ProxyConn) Login(clientData login.ClientData, session *session.Session, protocol int32) (err error)
- func (c *ProxyConn) Protocol() int32
- func (c *ProxyConn) ReadLoop() error
- func (c *ProxyConn) ReadPackets() (packets [][]byte, err error)
- func (c *ProxyConn) SetAuthEnabled(enabled bool)
- func (conn *ProxyConn) WritePacket(pk packet.Packet) error
- func (c *ProxyConn) WritePackets(pks [][]byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrOutdatedClient = errors.New("outdated client") ErrOutdatedServer = errors.New("outdated server") )
Functions ¶
Types ¶
type PacketData ¶
type PacketData struct {
// contains filtered or unexported fields
}
PacketData holds the data of a Minecraft packet.
func ParseData ¶
func ParseData(data []byte) (*PacketData, error)
ParseData parses the packet data slice passed into a packetData struct.
func (*PacketData) Header ¶
func (p *PacketData) Header() *packet.Header
func (*PacketData) Payload ¶
func (p *PacketData) Payload() *bytes.Buffer
type ProxyConn ¶
type ProxyConn struct {
// contains filtered or unexported fields
}
func NewProxyConn ¶
func (*ProxyConn) ClientData ¶
func (c *ProxyConn) ClientData() login.ClientData
func (*ProxyConn) IdentityData ¶
func (c *ProxyConn) IdentityData() login.IdentityData
func (*ProxyConn) ReadPackets ¶
func (*ProxyConn) SetAuthEnabled ¶
func (*ProxyConn) WritePackets ¶
Click to show internal directories.
Click to hide internal directories.