Documentation ¶
Overview ¶
Package packets implements reading and writing of packets from bancho.
Index ¶
- Constants
- func Packetify(packets []Packetifier) ([]byte, error)
- type BanchoAnnounce
- type BanchoBanInfo
- type BanchoChannelAvailable
- type BanchoChannelAvailableAutojoin
- type BanchoChannelJoinSuccess
- type BanchoChannelListingComplete
- type BanchoChannelRevoked
- type BanchoFellowSpectatorJoined
- type BanchoFellowSpectatorLeft
- type BanchoFriendList
- type BanchoHandleUserUpdate
- type BanchoLoginPermissions
- type BanchoLoginReply
- type BanchoMatchDisband
- type BanchoMatchNew
- type BanchoProtocolVersion
- type BanchoSendMessage
- type BanchoSpectateFrames
- type BanchoSpectatorCantSpectate
- type BanchoSpectatorJoined
- type BanchoSpectatorLeft
- type BanchoUserPresence
- type BanchoUserPresenceBundle
- type BanchoUserPresenceSingle
- type BanchoUserQuit
- type BanchoUserSilenced
- type Depacketifier
- type OsuCantSpectate
- type OsuChannelJoin
- type OsuChannelLeave
- type OsuExit
- type OsuLobbyJoin
- type OsuLobbyPart
- type OsuPong
- type OsuRequestStatusUpdate
- type OsuSendMessage
- type OsuSendPrivateMessage
- type OsuSendUserState
- type OsuSpectateFrames
- type OsuStartSpectating
- type OsuStopSpectating
- type OsuUserPresenceRequest
- type OsuUserStatsRequest
- type Packet
- type Packetifier
Constants ¶
const ( StatusIdle = iota StatusAFK StatusPlaying StatusEditing StatusModding StatusMultiplayer StatusWatching StatusUnknown StatusTesting StatusSubmitting StatusPaused StatusLobby StatusMultiplaying StatusOsuDirect )
actions of an user
Variables ¶
This section is empty.
Functions ¶
func Packetify ¶
func Packetify(packets []Packetifier) ([]byte, error)
Packetify transforms a slice of packets into a slice of bytes, to be transmitted to the osu! client.
Types ¶
type BanchoAnnounce ¶
type BanchoAnnounce struct {
Message string
}
BanchoAnnounce is sent by bancho to notify the osu! clients of something.
func (*BanchoAnnounce) Depacketify ¶
func (p *BanchoAnnounce) Depacketify(b []byte) error
Depacketify decodes a BanchoAnnounce.
func (BanchoAnnounce) Packetify ¶
func (p BanchoAnnounce) Packetify() ([]byte, error)
Packetify encodes a BanchoAnnounce into a byte slice.
type BanchoBanInfo ¶
type BanchoBanInfo struct {
Seconds int32
}
BanchoBanInfo tells the client information about the lenght of the silence for the user.
func (*BanchoBanInfo) Depacketify ¶
func (p *BanchoBanInfo) Depacketify(b []byte) error
Depacketify decodes a BanchoBanInfo.
func (BanchoBanInfo) Packetify ¶
func (p BanchoBanInfo) Packetify() ([]byte, error)
Packetify encodes a BanchoBanInfo into a byte slice.
type BanchoChannelAvailable ¶
BanchoChannelAvailable is sent by the server to inform the osu! client about the existance of a channel. For channels where the user auto-joins, BanchoChannelAvailableAutojoin is used instead.
func (*BanchoChannelAvailable) Depacketify ¶
func (p *BanchoChannelAvailable) Depacketify(b []byte) error
Depacketify decodes a BanchoChannelAvailable.
func (BanchoChannelAvailable) Packetify ¶
func (p BanchoChannelAvailable) Packetify() ([]byte, error)
Packetify encodes a BanchoChannelAvailable into a byte slice.
type BanchoChannelAvailableAutojoin ¶
type BanchoChannelAvailableAutojoin struct {
Channel string
}
BanchoChannelAvailableAutojoin tells the user about a channel, straight before adding them to it. I don't quite understand why this is a thing, but whatever.
func (*BanchoChannelAvailableAutojoin) Depacketify ¶
func (p *BanchoChannelAvailableAutojoin) Depacketify(b []byte) error
Depacketify decodes a BanchoChannelAvailableAutojoin.
func (BanchoChannelAvailableAutojoin) Packetify ¶
func (p BanchoChannelAvailableAutojoin) Packetify() ([]byte, error)
Packetify encodes a BanchoChannelAvailableAutojoin into a byte slice.
type BanchoChannelJoinSuccess ¶
type BanchoChannelJoinSuccess struct {
Channel string
}
BanchoChannelJoinSuccess is sent by the server the client has successfully joined a channel.
func (*BanchoChannelJoinSuccess) Depacketify ¶
func (p *BanchoChannelJoinSuccess) Depacketify(b []byte) error
Depacketify decodes a BanchoChannelJoinSuccess.
func (BanchoChannelJoinSuccess) Packetify ¶
func (p BanchoChannelJoinSuccess) Packetify() ([]byte, error)
Packetify encodes a BanchoChannelJoinSuccess into a byte slice.
type BanchoChannelListingComplete ¶
type BanchoChannelListingComplete struct { }
BanchoChannelListingComplete says the channel listing has been completed.
func (*BanchoChannelListingComplete) Depacketify ¶
func (p *BanchoChannelListingComplete) Depacketify(b []byte) error
Depacketify decodes a BanchoChannelListingComplete.
func (BanchoChannelListingComplete) Packetify ¶
func (p BanchoChannelListingComplete) Packetify() ([]byte, error)
Packetify encodes a BanchoChannelListingComplete into a byte slice.
type BanchoChannelRevoked ¶
type BanchoChannelRevoked struct {
Channel string
}
BanchoChannelRevoked is sent by the server to the osu! client to get the fuck out of a channel.
func (*BanchoChannelRevoked) Depacketify ¶
func (p *BanchoChannelRevoked) Depacketify(b []byte) error
Depacketify decodes a BanchoChannelRevoked.
func (BanchoChannelRevoked) Packetify ¶
func (p BanchoChannelRevoked) Packetify() ([]byte, error)
Packetify encodes a BanchoChannelRevoked into a byte slice.
type BanchoFellowSpectatorJoined ¶
type BanchoFellowSpectatorJoined struct {
User int32
}
BanchoFellowSpectatorJoined is sent to all other spectators of an user when they connect (except to the new spectator.)
func (*BanchoFellowSpectatorJoined) Depacketify ¶
func (p *BanchoFellowSpectatorJoined) Depacketify(b []byte) error
Depacketify decodes a BanchoFellowSpectatorJoined.
func (BanchoFellowSpectatorJoined) Packetify ¶
func (p BanchoFellowSpectatorJoined) Packetify() ([]byte, error)
Packetify encodes a BanchoFellowSpectatorJoined into a byte slice.
type BanchoFellowSpectatorLeft ¶
type BanchoFellowSpectatorLeft struct {
User int32
}
BanchoFellowSpectatorLeft is sent to all other spectators of an user when they aren't spectating the user anymore.
func (*BanchoFellowSpectatorLeft) Depacketify ¶
func (p *BanchoFellowSpectatorLeft) Depacketify(b []byte) error
Depacketify decodes a BanchoFellowSpectatorLeft.
func (BanchoFellowSpectatorLeft) Packetify ¶
func (p BanchoFellowSpectatorLeft) Packetify() ([]byte, error)
Packetify encodes a BanchoFellowSpectatorLeft into a byte slice.
type BanchoFriendList ¶
type BanchoFriendList struct {
Friends []int32
}
BanchoFriendList is a list of the friend of the user.
func (*BanchoFriendList) Depacketify ¶
func (p *BanchoFriendList) Depacketify(b []byte) error
Depacketify decodes a BanchoFriendList.
func (BanchoFriendList) Packetify ¶
func (p BanchoFriendList) Packetify() ([]byte, error)
Packetify encodes a BanchoFriendList into a byte slice.
type BanchoHandleUserUpdate ¶
type BanchoHandleUserUpdate struct { ID int32 Action uint8 // afk, modding, playing, osudirect... ActionText string ActionMapMD5 string ActionMods int32 ActionGameMode uint8 ActionBeatmapID uint32 RankedScore uint64 Accuracy float32 // 0.1337 = 13.37% Playcount uint32 TotalScore uint64 Rank int32 PP uint16 }
BanchoHandleUserUpdate contains all the information about an user you will ever need.
func (*BanchoHandleUserUpdate) Depacketify ¶
func (p *BanchoHandleUserUpdate) Depacketify(b []byte) error
Depacketify decodes a BanchoHandleUserUpdate.
func (BanchoHandleUserUpdate) Packetify ¶
func (p BanchoHandleUserUpdate) Packetify() ([]byte, error)
Packetify encodes a BanchoHandleUserUpdate into a byte slice.
type BanchoLoginPermissions ¶
type BanchoLoginPermissions struct {
Permissions int32
}
BanchoLoginPermissions are the privileges assigned to the user.
func (*BanchoLoginPermissions) Depacketify ¶
func (p *BanchoLoginPermissions) Depacketify(b []byte) error
Depacketify decodes a BanchoLoginPermissions.
func (BanchoLoginPermissions) Packetify ¶
func (p BanchoLoginPermissions) Packetify() ([]byte, error)
Packetify encodes a BanchoLoginPermissions into a byte slice.
type BanchoLoginReply ¶
type BanchoLoginReply struct {
UserID int32 // may have negative values
}
BanchoLoginReply is a packet containing either an user ID or an authentication error (see handler/authenticate.go).
func (*BanchoLoginReply) Depacketify ¶
func (p *BanchoLoginReply) Depacketify(b []byte) error
Depacketify decodes a BanchoLoginReply.
func (BanchoLoginReply) Packetify ¶
func (p BanchoLoginReply) Packetify() ([]byte, error)
Packetify encodes a BanchoLoginReply into a byte slice.
type BanchoMatchDisband ¶
type BanchoMatchDisband struct {
Match int32
}
BanchoMatchDisband tells a user of the match that the match has been disbanded. This is also sent in response to an user requesting to leave the match.
func (*BanchoMatchDisband) Depacketify ¶
func (p *BanchoMatchDisband) Depacketify(b []byte) error
Depacketify decodes a BanchoMatchDisband.
func (BanchoMatchDisband) Packetify ¶
func (p BanchoMatchDisband) Packetify() ([]byte, error)
Packetify encodes a BanchoMatchDisband into a byte slice.
type BanchoMatchNew ¶
type BanchoMatchNew struct { ID int32 InProgress bool MatchType byte ActiveMods uint32 Name string Password string BeatmapName string BeatmapID int32 BeatmapChecksum string SlotStatuses [16]byte SlotTeams [16]byte SlotUsers [16]int32 Host int32 PlayMode byte MatchScoringType byte MatchTeamType byte Freemod ob.Freemod Seed int32 }
BanchoMatchNew is sent when an user joins a multiplayer lobby, for every match currently being played.
func (*BanchoMatchNew) Depacketify ¶
func (p *BanchoMatchNew) Depacketify(b []byte) error
Depacketify decodes a BanchoMatchNew.
func (BanchoMatchNew) Packetify ¶
func (p BanchoMatchNew) Packetify() ([]byte, error)
Packetify encodes a BanchoMatchNew into a byte slice.
type BanchoProtocolVersion ¶
type BanchoProtocolVersion struct {
Version int32
}
BanchoProtocolVersion is the version of the bancho protocol, which is sent to the client at login.
func (*BanchoProtocolVersion) Depacketify ¶
func (p *BanchoProtocolVersion) Depacketify(b []byte) error
Depacketify decodes a BanchoProtocolVersion.
func (BanchoProtocolVersion) Packetify ¶
func (p BanchoProtocolVersion) Packetify() ([]byte, error)
Packetify encodes a BanchoProtocolVersion into a byte slice.
type BanchoSendMessage ¶
type BanchoSendMessage struct { SenderName string // Sender's username Content string Channel string SenderID int32 // Sender's ID }
BanchoSendMessage is the serverside counterpart of OsuSendMessage. It simply sends a message to a channel on osu!.
func (*BanchoSendMessage) Depacketify ¶
func (p *BanchoSendMessage) Depacketify(b []byte) error
Depacketify decodes a BanchoSendMessage.
func (BanchoSendMessage) Packetify ¶
func (p BanchoSendMessage) Packetify() ([]byte, error)
Packetify encodes a BanchoSendMessage into a byte slice.
type BanchoSpectateFrames ¶
type BanchoSpectateFrames struct { Extra int32 Frames []ob.SpectateFrame Action byte Time int32 ID byte Count300 uint16 Count100 uint16 Count50 uint16 Geki uint16 Katu uint16 Miss uint16 TotalScore int32 MaxCombo uint16 CurrentCombo uint16 Perfect bool HP byte TagByte byte // ??? Scorev2Portion ob.Scorev2Portion SomeUint16 uint16 }
BanchoSpectateFrames sends the client frames of the user they are spectating.
func (*BanchoSpectateFrames) Depacketify ¶
func (p *BanchoSpectateFrames) Depacketify(b []byte) error
Depacketify decodes a BanchoSpectateFrames.
func (BanchoSpectateFrames) Packetify ¶
func (p BanchoSpectateFrames) Packetify() ([]byte, error)
Packetify encodes a BanchoSpectateFrames into a byte slice.
type BanchoSpectatorCantSpectate ¶
type BanchoSpectatorCantSpectate struct {
User int32
}
BanchoSpectatorCantSpectate is sent when an user who is spectating you doesn't have the beatmap you are playing
func (*BanchoSpectatorCantSpectate) Depacketify ¶
func (p *BanchoSpectatorCantSpectate) Depacketify(b []byte) error
Depacketify decodes a BanchoSpectatorCantSpectate.
func (BanchoSpectatorCantSpectate) Packetify ¶
func (p BanchoSpectatorCantSpectate) Packetify() ([]byte, error)
Packetify encodes a BanchoSpectatorCantSpectate into a byte slice.
type BanchoSpectatorJoined ¶
type BanchoSpectatorJoined struct {
User int32
}
BanchoSpectatorJoined tells the client that there is a new spectator.
func (*BanchoSpectatorJoined) Depacketify ¶
func (p *BanchoSpectatorJoined) Depacketify(b []byte) error
Depacketify decodes a BanchoSpectatorJoined.
func (BanchoSpectatorJoined) Packetify ¶
func (p BanchoSpectatorJoined) Packetify() ([]byte, error)
Packetify encodes a BanchoSpectatorJoined into a byte slice.
type BanchoSpectatorLeft ¶
type BanchoSpectatorLeft struct {
User int32
}
BanchoSpectatorLeft tells the client that a spectator has left.
func (*BanchoSpectatorLeft) Depacketify ¶
func (p *BanchoSpectatorLeft) Depacketify(b []byte) error
Depacketify decodes a BanchoSpectatorLeft.
func (BanchoSpectatorLeft) Packetify ¶
func (p BanchoSpectatorLeft) Packetify() ([]byte, error)
Packetify encodes a BanchoSpectatorLeft into a byte slice.
type BanchoUserPresence ¶
type BanchoUserPresence struct { ID int32 Name string UTCOffset uint8 // 24 looks like a good value Country uint8 Privileges uint8 Longitude float32 Latitude float32 Rank int32 }
BanchoUserPresence tells the client basic information about a certain user.
func (*BanchoUserPresence) Depacketify ¶
func (p *BanchoUserPresence) Depacketify(b []byte) error
Depacketify decodes a BanchoUserPresence.
func (BanchoUserPresence) Packetify ¶
func (p BanchoUserPresence) Packetify() ([]byte, error)
Packetify encodes a BanchoUserPresence into a byte slice.
type BanchoUserPresenceBundle ¶
type BanchoUserPresenceBundle struct {
IDs []int32
}
BanchoUserPresenceBundle is used to initially broadcast to an user the users currently online on the server.
func (*BanchoUserPresenceBundle) Depacketify ¶
func (p *BanchoUserPresenceBundle) Depacketify(b []byte) error
Depacketify decodes a BanchoUserPresenceBundle.
func (BanchoUserPresenceBundle) Packetify ¶
func (p BanchoUserPresenceBundle) Packetify() ([]byte, error)
Packetify encodes a BanchoUserPresenceBundle into a byte slice.
type BanchoUserPresenceSingle ¶
type BanchoUserPresenceSingle struct {
ID int32
}
BanchoUserPresenceSingle is used to broadcasts to users about when an user comes online.
func (*BanchoUserPresenceSingle) Depacketify ¶
func (p *BanchoUserPresenceSingle) Depacketify(b []byte) error
Depacketify decodes a BanchoUserPresenceSingle.
func (BanchoUserPresenceSingle) Packetify ¶
func (p BanchoUserPresenceSingle) Packetify() ([]byte, error)
Packetify encodes a BanchoUserPresenceSingle into a byte slice.
type BanchoUserQuit ¶
BanchoUserQuit tells clients that an user has exited the game.
func (*BanchoUserQuit) Depacketify ¶
func (p *BanchoUserQuit) Depacketify(b []byte) error
Depacketify decodes a BanchoUserQuit.
func (BanchoUserQuit) Packetify ¶
func (p BanchoUserQuit) Packetify() ([]byte, error)
Packetify encodes a BanchoUserQuit into a byte slice.
type BanchoUserSilenced ¶
type BanchoUserSilenced struct {
ID int32
}
BanchoUserSilenced is sent when an user (specified by its ID) is silenced, so that their messages are cleared.
func (*BanchoUserSilenced) Depacketify ¶
func (p *BanchoUserSilenced) Depacketify(b []byte) error
Depacketify decodes a BanchoUserSilenced.
func (BanchoUserSilenced) Packetify ¶
func (p BanchoUserSilenced) Packetify() ([]byte, error)
Packetify encodes a BanchoUserSilenced into a byte slice.
type Depacketifier ¶
Depacketifier wraps around Depacketify
type OsuCantSpectate ¶
type OsuCantSpectate struct { }
OsuCantSpectate is sent by the client when they don't have the beatmap the host is playing.
func (*OsuCantSpectate) Depacketify ¶
func (p *OsuCantSpectate) Depacketify(b []byte) error
Depacketify decodes a OsuCantSpectate.
func (OsuCantSpectate) Packetify ¶
func (p OsuCantSpectate) Packetify() ([]byte, error)
Packetify encodes a OsuCantSpectate into a byte slice.
type OsuChannelJoin ¶
type OsuChannelJoin struct {
Channel string
}
OsuChannelJoin is sent by the osu! client whenever it wishes to join a channel.
func (*OsuChannelJoin) Depacketify ¶
func (p *OsuChannelJoin) Depacketify(b []byte) error
Depacketify decodes a OsuChannelJoin.
func (OsuChannelJoin) Packetify ¶
func (p OsuChannelJoin) Packetify() ([]byte, error)
Packetify encodes a OsuChannelJoin into a byte slice.
type OsuChannelLeave ¶
type OsuChannelLeave struct {
Channel string
}
OsuChannelLeave requests to part a channel.
func (*OsuChannelLeave) Depacketify ¶
func (p *OsuChannelLeave) Depacketify(b []byte) error
Depacketify decodes a OsuChannelLeave.
func (OsuChannelLeave) Packetify ¶
func (p OsuChannelLeave) Packetify() ([]byte, error)
Packetify encodes a OsuChannelLeave into a byte slice.
type OsuExit ¶
type OsuExit struct {
Reason int32 // 0 if closing, 1 if updating
}
OsuExit is sent by the osu! client whenever the client closes
func (*OsuExit) Depacketify ¶
Depacketify decodes a OsuExit.
type OsuLobbyJoin ¶
type OsuLobbyJoin struct { }
OsuLobbyJoin requests to join the multiplayer lobby.
func (*OsuLobbyJoin) Depacketify ¶
func (p *OsuLobbyJoin) Depacketify(b []byte) error
Depacketify decodes a OsuLobbyJoin.
func (OsuLobbyJoin) Packetify ¶
func (p OsuLobbyJoin) Packetify() ([]byte, error)
Packetify encodes a OsuLobbyJoin into a byte slice.
type OsuLobbyPart ¶
type OsuLobbyPart struct { }
OsuLobbyPart requests to leave the multiplayer lobby and not get any more updates about the lobby.
func (*OsuLobbyPart) Depacketify ¶
func (p *OsuLobbyPart) Depacketify(b []byte) error
Depacketify decodes a OsuLobbyPart.
func (OsuLobbyPart) Packetify ¶
func (p OsuLobbyPart) Packetify() ([]byte, error)
Packetify encodes a OsuLobbyPart into a byte slice.
type OsuPong ¶
type OsuPong struct { }
OsuPong is received from the client to notify it's still alive (sent when there would otherwise be nothing in the POST body)
func (*OsuPong) Depacketify ¶
Depacketify decodes a OsuPong.
type OsuRequestStatusUpdate ¶
type OsuRequestStatusUpdate struct { }
OsuRequestStatusUpdate is a request to update the status of the current user. If it changed, then it is also a request to distribute it to all those who need it (spectators)
func (*OsuRequestStatusUpdate) Depacketify ¶
func (p *OsuRequestStatusUpdate) Depacketify(b []byte) error
Depacketify decodes a OsuRequestStatusUpdate.
func (OsuRequestStatusUpdate) Packetify ¶
func (p OsuRequestStatusUpdate) Packetify() ([]byte, error)
Packetify encodes a OsuRequestStatusUpdate into a byte slice.
type OsuSendMessage ¶
type OsuSendMessage struct { SenderName string // Sender's username, must be replaced server-side Content string Channel string SenderID int32 // Sender's ID, should be replaced server-side by actual user ID }
OsuSendMessage sends a message through the osu! chat.
func (*OsuSendMessage) Depacketify ¶
func (p *OsuSendMessage) Depacketify(b []byte) error
Depacketify decodes a OsuSendMessage.
func (OsuSendMessage) Packetify ¶
func (p OsuSendMessage) Packetify() ([]byte, error)
Packetify encodes a OsuSendMessage into a byte slice.
type OsuSendPrivateMessage ¶
type OsuSendPrivateMessage struct { SenderName string // Sender's username Content string Channel string SenderID int32 // Sender's ID }
OsuSendPrivateMessage is a request to send a private message to an user. The target is specified in the field "Channel".
func (*OsuSendPrivateMessage) Depacketify ¶
func (p *OsuSendPrivateMessage) Depacketify(b []byte) error
Depacketify decodes a OsuSendPrivateMessage.
func (OsuSendPrivateMessage) Packetify ¶
func (p OsuSendPrivateMessage) Packetify() ([]byte, error)
Packetify encodes a OsuSendPrivateMessage into a byte slice.
type OsuSendUserState ¶
type OsuSendUserState struct { Action uint8 // afk, modding, playing, osudirect... Text string MapMD5 string Mods int32 GameMode uint8 BeatmapID uint32 }
OsuSendUserState informs bancho about what's the user currently doing (playing, listening, multiplaying what beatmap with what mods on what mode)
func (*OsuSendUserState) Depacketify ¶
func (p *OsuSendUserState) Depacketify(b []byte) error
Depacketify decodes a OsuSendUserState.
func (OsuSendUserState) Packetify ¶
func (p OsuSendUserState) Packetify() ([]byte, error)
Packetify encodes a OsuSendUserState into a byte slice.
type OsuSpectateFrames ¶
type OsuSpectateFrames struct { Extra int32 Frames []ob.SpectateFrame Action byte Time int32 ID byte Count300 uint16 Count100 uint16 Count50 uint16 Geki uint16 Katu uint16 Miss uint16 TotalScore int32 MaxCombo uint16 CurrentCombo uint16 Perfect bool HP byte TagByte byte // ??? Scorev2Portion ob.Scorev2Portion SomeUint16 uint16 }
OsuSpectateFrames is sent by the client, and contains the frames that must be sent to all the spectators of the user.
func (*OsuSpectateFrames) Depacketify ¶
func (p *OsuSpectateFrames) Depacketify(b []byte) error
Depacketify decodes a OsuSpectateFrames.
func (OsuSpectateFrames) Packetify ¶
func (p OsuSpectateFrames) Packetify() ([]byte, error)
Packetify encodes a OsuSpectateFrames into a byte slice.
type OsuStartSpectating ¶
type OsuStartSpectating struct {
User int32
}
OsuStartSpectating is sent by the osu! client when it wishes to start spectating somebody.
func (*OsuStartSpectating) Depacketify ¶
func (p *OsuStartSpectating) Depacketify(b []byte) error
Depacketify decodes a OsuStartSpectating.
func (OsuStartSpectating) Packetify ¶
func (p OsuStartSpectating) Packetify() ([]byte, error)
Packetify encodes a OsuStartSpectating into a byte slice.
type OsuStopSpectating ¶
type OsuStopSpectating struct { }
OsuStopSpectating is sent by the client when it wishes to stop spectating the user it is spectating.
func (*OsuStopSpectating) Depacketify ¶
func (p *OsuStopSpectating) Depacketify(b []byte) error
Depacketify decodes a OsuStopSpectating.
func (OsuStopSpectating) Packetify ¶
func (p OsuStopSpectating) Packetify() ([]byte, error)
Packetify encodes a OsuStopSpectating into a byte slice.
type OsuUserPresenceRequest ¶
type OsuUserPresenceRequest struct {
IDs []int32
}
OsuUserPresenceRequest is a request to have a BanchoUserPresence of some users.
func (*OsuUserPresenceRequest) Depacketify ¶
func (p *OsuUserPresenceRequest) Depacketify(b []byte) error
Depacketify decodes a OsuUserPresenceRequest.
func (OsuUserPresenceRequest) Packetify ¶
func (p OsuUserPresenceRequest) Packetify() ([]byte, error)
Packetify encodes a OsuUserPresenceRequest into a byte slice.
type OsuUserStatsRequest ¶
type OsuUserStatsRequest struct {
IDs []int32
}
OsuUserStatsRequest is a request to have a BanchoHandleUserUpdate of some users.
func (*OsuUserStatsRequest) Depacketify ¶
func (p *OsuUserStatsRequest) Depacketify(b []byte) error
Depacketify decodes a OsuUserStatsRequest.
func (OsuUserStatsRequest) Packetify ¶
func (p OsuUserStatsRequest) Packetify() ([]byte, error)
Packetify encodes a OsuUserStatsRequest into a byte slice.
type Packet ¶
type Packet interface { Packetifier Depacketifier }
Packet is a generic interface that can be transformed into a Bancho packet through the function Packetify.
func Depacketify ¶
Depacketify decodes a byte slice received from the osu! client into a packet slice.
type Packetifier ¶
Packetifier wraps around Packetify
Source Files ¶
- 000_osu_send_user_state.go
- 001_osu_send_message.go
- 002_osu_exit.go
- 003_osu_request_status_update.go
- 004_osu_pong.go
- 005_bancho_login_reply.go
- 007_bancho_send_message.go
- 011_bancho_handle_user_update.go
- 012_bancho_user_quit.go
- 013_bancho_spectator_joined.go
- 014_bancho_spectator_left.go
- 015_bancho_spectate_frames.go
- 016_osu_start_spectating.go
- 017_osu_stop_spectating.go
- 018_osu_spectate_frames.go
- 021_osu_cant_spectate.go
- 022_bancho_spectator_cant_spectate.go
- 024_bancho_announce.go
- 025_osu_send_private_message.go
- 027_bancho_match_new.go
- 028_bancho_match_disband.go
- 029_osu_lobby_part.go
- 030_osu_lobby_join.go
- 042_bancho_fellow_spectator_joined.go
- 043_bancho_fellow_spectator_left.go
- 063_osu_channel_join.go
- 064_bancho_channel_join_success.go
- 065_bancho_channel_available.go
- 066_bancho_channel_revoked.go
- 067_bancho_channel_available_autojoin.go
- 071_bancho_login_permissions.go
- 072_bancho_friend_list.go
- 075_bancho_protocol_version.go
- 078_osu_channel_leave.go
- 083_bancho_user_presence.go
- 085_osu_user_stats_request.go
- 089_bancho_channel_listing_complete.go
- 092_bancho_ban_info.go
- 094_bancho_user_silenced.go
- 095_bancho_user_presence_single.go
- 096_bancho_user_presence_bundle.go
- 097_osu_user_presence_request.go
- dp_p.go
- gen.go
- packet.go
- status.go