Documentation ¶
Index ¶
- func Marshal(m interface{}) []byte
- func Ping(ip *net.TCPAddr) ([]byte, error)
- func Unmarshal(data io.Reader, out interface{})
- type APIAuthResponse
- type APIProfile
- type APIProperty
- type APIUser
- type CompressedData
- type CompressedPacket
- type Conn
- type EncryptionRequest
- type EncryptionResponse
- type Handshake
- type LoginStart
- type PingMod
- type PingModInfo
- type PingPlayer
- type PingPlayers
- type PingResponse
- type PingText
- type PingVersionInfo
- type PluginMessage
- type SetCompression
- type String
- type UncompressedPacket
- type VarInt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIAuthResponse ¶
type APIAuthResponse struct { User APIUser `json:"user"` ClientToken string `json:"clientToken"` AccessToken string `json:"accessToken"` AvailableProfiles []APIProfile `json:"availableProfiles"` SelectedProfile APIProfile `json:"selectedProfile"` }
type APIProfile ¶
type APIProperty ¶
type APIUser ¶
type APIUser struct { Username string `json:"username"` Properties []APIProperty `json:"properties"` ID string `json:"id"` // Remote ID }
type CompressedData ¶
type CompressedData struct {
PacketID VarInt
}
type CompressedPacket ¶
type Conn ¶
type Conn struct { TCP *net.TCPConn Compressed bool Encrypted bool AuthResp APIAuthResponse Cipher cipher.Stream CompressionThreshold int }
type EncryptionRequest ¶
type EncryptionRequest struct { ServerID String PubKeyLength VarInt PubKey []byte VerifyTokenLength VarInt VerifyToken []byte }
Not used - for reference only
type EncryptionResponse ¶
type PingModInfo ¶
type PingPlayer ¶
type PingPlayers ¶
type PingPlayers struct { Max int `json:"max"` Online int `json:"online"` Sample []PingPlayer `json:"sample"` }
type PingResponse ¶
type PingResponse struct { Description PingText `json:"description"` Players PingPlayers `json:"players"` Version PingVersionInfo `json:"version"` Favicon string `json:"favicon"` ModInfo PingModInfo `json:"modinfo,omitempty"` }
SERVER
type PingVersionInfo ¶
type PluginMessage ¶
type SetCompression ¶
type SetCompression struct {
Threshold VarInt
}
type String ¶
type String string
func (*String) Deserialize ¶
Returns the rest of the data that has not been read
type UncompressedPacket ¶
Click to show internal directories.
Click to hide internal directories.