mirror of
https://github.com/PretendoNetwork/friends.git
synced 2026-04-25 07:18:36 -05:00
34 lines
942 B
Go
34 lines
942 B
Go
package main
|
|
|
|
import (
|
|
nex "github.com/PretendoNetwork/nex-go"
|
|
nexproto "github.com/PretendoNetwork/nex-protocols-go"
|
|
)
|
|
|
|
func checkSettingStatus(err error, client *nex.Client, callID uint32) {
|
|
rmcResponseStream := nex.NewStreamOut(nexServer)
|
|
|
|
rmcResponseStream.WriteUInt8(0xFF)
|
|
|
|
rmcResponseBody := rmcResponseStream.Bytes()
|
|
|
|
// Build response packet
|
|
rmcResponse := nex.NewRMCResponse(nexproto.FriendsProtocolID, callID)
|
|
rmcResponse.SetSuccess(nexproto.FriendsMethodCheckSettingStatus, rmcResponseBody)
|
|
|
|
rmcResponseBytes := rmcResponse.Bytes()
|
|
|
|
responsePacket, _ := nex.NewPacketV0(client, nil)
|
|
|
|
responsePacket.SetVersion(0)
|
|
responsePacket.SetSource(0xA1)
|
|
responsePacket.SetDestination(0xAF)
|
|
responsePacket.SetType(nex.DataPacket)
|
|
responsePacket.SetPayload(rmcResponseBytes)
|
|
|
|
responsePacket.AddFlag(nex.FlagNeedsAck)
|
|
responsePacket.AddFlag(nex.FlagReliable)
|
|
|
|
nexServer.Send(responsePacket)
|
|
}
|