mirror of
https://github.com/PretendoNetwork/super-mario-maker.git
synced 2026-08-02 00:15:36 -05:00
35 lines
993 B
Go
35 lines
993 B
Go
package main
|
|
|
|
import (
|
|
nex "github.com/PretendoNetwork/nex-go"
|
|
nexproto "github.com/PretendoNetwork/nex-protocols-go"
|
|
)
|
|
|
|
func getBufferQueue(err error, client *nex.Client, callID uint32, bufferQueueParam *nexproto.BufferQueueParam) {
|
|
rmcResponseStream := nex.NewStreamOut(nexServer)
|
|
|
|
// TODO complete this
|
|
|
|
rmcResponseStream.WriteUInt32LE(0x00000000) // pBufferQueue List length 0
|
|
|
|
rmcResponseBody := rmcResponseStream.Bytes()
|
|
|
|
rmcResponse := nex.NewRMCResponse(nexproto.DataStoreSMMProtocolID, callID)
|
|
rmcResponse.SetSuccess(nexproto.DataStoreSMMMethodGetBufferQueue, rmcResponseBody)
|
|
|
|
rmcResponseBytes := rmcResponse.Bytes()
|
|
|
|
responsePacket, _ := nex.NewPacketV1(client, nil)
|
|
|
|
responsePacket.SetVersion(1)
|
|
responsePacket.SetSource(0xA1)
|
|
responsePacket.SetDestination(0xAF)
|
|
responsePacket.SetType(nex.DataPacket)
|
|
responsePacket.SetPayload(rmcResponseBytes)
|
|
|
|
responsePacket.AddFlag(nex.FlagNeedsAck)
|
|
responsePacket.AddFlag(nex.FlagReliable)
|
|
|
|
nexServer.Send(responsePacket)
|
|
}
|